Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> Inconsistent Variable declaration

How so?

> I would have used strcpy 2 times

You can't do this, because strcpy doesn't give you the length of the string you copied, which is necessary to put the trailing null byte.



strcpy writes a trailing zero.

> The strcpy() function copies the string pointed to by src, including the terminating null byte ('\0'), to the buffer pointed to by dest.


Yup, I'm aware of that, but the author of that code sure isn't ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: