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

Fortunately, Ulrich Drepper doesn't work on the kernel. Otherwise we would all have to pay money to open bug reports[1]

His preferred solution is to use the highly portable

  *((char *) mempcpy (dst, src, n)) = '\0';
make of that what you will…

[1] http://sourceware.org/bugzilla/show_bug.cgi?id=4980



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: