[OpenAFS-devel] Re: dumpstuff.c: ReadString: ?

Harald Barth haba@pdc.kth.se
Mon, 07 Nov 2005 18:08:53 +0100 (MET)


This part of code could have been written so that it is more obvious
what's going on. I could probably figure it out, but as you allready
have, you may write a version of ReadString() that is more easy to
read and does not have this dangerous edge cases (what happens if
called with maxa == 0? Btw, todays compilers should be able to figure
out "register" at the right places by themselves.

And yeah, I just wanted to say you that in C x[y] just is a shorthand
for pointer arithmentic *(x + y) and the same thing as y[x]. To confuse
people, you can write 1[x] instead of x[1].

Harald.