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

fmemopen takes the buffer length, and there is no need to have the buffer \0 terminated, so instead of strlen you can also just give the buffer size.

The number of bytes parsed can be fetched with the scanf %n format specifier.



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

Search: