pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:2326:    /* Ensure NUL-termination */    s->s->str[s->s->len << s->s->size_shift] = 0;   }      PMOD_EXPORT void string_builder_putchars(struct string_builder *s, int ch,    ptrdiff_t count)   {    ptrdiff_t len = s->s->len;    int mag = min_magnitude(ch);    -  // This is not really expected to happen. But since we are doing -  // memset here, a negative argument should be avoided. -  if (count < 0) Pike_fatal("Non-positive count in call to string_builder_putchars().\n"); +  /* This is not really expected to happen. But since we are doing +  * memset here, a negative argument should be avoided. */ +  if (count < 0) +  Pike_fatal("Non-positive count in call to string_builder_putchars().\n");    if (!count) return;       string_build_mkspace(s, count, mag);    if (mag > s->known_shift) {    s->known_shift = mag;    }       switch (s->s->size_shift) {    case 0:    MEMSET (STR0 (s->s) + s->s->len, ch, count);