From: Hans U. N. <hu...@n-...> - 2007-06-27 11:19:46
|
Jan Patera wrote: >> make sure the returned string is zero terminated >=20 >> + val[maxlen-1] =3D '\0'; /* make sure the returned string is zero >> terminated */ >=20 > Hans, this is not needed. Actually it is contraproductive - it may > cut the string by one 1 byte: >=20 > All the get functions start with this: >=20 > memset (val, 0, maxlen); > maxlen--; >=20 > To ease coding. Argh. I had not seen that. Reverting patch, adding comment. Thanks for paying attention. |