Skip to content

Commit 44fd85d

Browse files
committed
src/io.c: fix for - overflowed return value
1 parent bf545ab commit 44fd85d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,14 +649,14 @@ nc_write_starttag_and_msg(struct nc_session *session, const void *buf, uint32_t
649649
r = sprintf(chunksize, "\n#%" PRIu32 "\n", count);
650650

651651
r = nc_write(session, chunksize, r);
652-
if (r == -1) {
652+
if (r < 0) {
653653
return -1;
654654
}
655655
ret += r;
656656
}
657657

658658
r = nc_write(session, buf, count);
659-
if (r == -1) {
659+
if (r < 0) {
660660
return -1;
661661
}
662662
ret += r;

0 commit comments

Comments
 (0)