suitcase

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

byte_zero.c (321B)


      1 #include "byte.h"
      2 
      3 /* void byte_zero(byte pointer s, unsigned int n)
      4  * zero up to n bytes of a byte array lodged at s.
      5  */
      6 void byte_zero(char *s, unsigned int n)
      7 {
      8   for (;;) {
      9     if (!n) break; *s++ = 0; --n;
     10     if (!n) break; *s++ = 0; --n;
     11     if (!n) break; *s++ = 0; --n;
     12     if (!n) break; *s++ = 0; --n;
     13   }
     14 }