skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

cdbmake_posplus.c (260B)


      1 /* ISC license. */
      2 
      3 #include <stdint.h>
      4 #include <errno.h>
      5 
      6 #include "cdbmake-internal.h"
      7 
      8 int cdbmake_posplus (cdbmaker *c, uint32_t len)
      9 {
     10   uint32_t newpos = c->pos + len ;
     11   if (newpos < len) return (errno = ENOMEM, 0) ;
     12   c->pos = newpos ;
     13   return 1 ;
     14 }