|
@@ -50,10 +50,9 @@ debug_fputch (void * f, int ch, void * b)
|
|
|
buf->buf[buf->end++] = ch;
|
|
|
|
|
|
if (ch == '\n') {
|
|
|
- if (debug_fputs(NULL, buf->buf, buf->end) == -1)
|
|
|
- return -1;
|
|
|
+ int ret = debug_fputs(NULL, buf->buf, buf->end);
|
|
|
buf->end = buf->start;
|
|
|
- return 0;
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
#if DEBUGBUF_BREAK == 1
|
|
@@ -69,6 +68,7 @@ debug_fputch (void * f, int ch, void * b)
|
|
|
#else
|
|
|
if (buf->end == DEBUGBUF_SIZE) {
|
|
|
debug_fputs(NULL, buf->buf, buf->end);
|
|
|
+ buf->end = buf->start;
|
|
|
}
|
|
|
#endif
|
|
|
|