LWN.net Logo

code feedback ...

code feedback ...

Posted Sep 14, 2011 5:33 UTC (Wed) by vapier (subscriber, #15768)
In reply to: code feedback ... by jzbiciak
Parent article: Ensuring data reaches disk

in the past i've been bitten where fwrite was given a char* and size==num bytes to write and nmemb==1 (like in the example here). but perhaps that was a bug in the lower layers (it was a ppc/glibc setup). i do know that size==sizeof(*buf) has always worked for me ;).


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds