3 ms·
Read that part again: > It was in assembler then, but the code in question was equivalent to something like this: > if (name[0] == '.') continue; > This s
by czx4f4bd 4y ago
Read that part again:
> It was in assembler then, but the code in question was equivalent to something like this:
> if (name[0] == '.') continue;
> This statement was a little shorter than what it should have been, which is
> if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) continue;
There's no strcmp() in the first example.
- vitiral 4y agoFor those who don't know, it should have been equivalent to: if (name[0] == '.') { if (name[1] == 0) continue; if (name[1] == '.' && name[2] == 0) continue; }