Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 lines
337 B

  1. #include "byte.h"
  2. /* byte_zero sets the bytes out[0], out[1], ..., out[len-1] to 0 */
  3. void byte_zero(void* out, unsigned long len) {
  4. register char* s=out;
  5. register const char* t=s+len;
  6. for (;;) {
  7. if (s==t) break; *s=0; ++s;
  8. if (s==t) break; *s=0; ++s;
  9. if (s==t) break; *s=0; ++s;
  10. if (s==t) break; *s=0; ++s;
  11. }
  12. }