X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/e2641e09cc0daf44f63f654230f72d22acf3a9af..1333f98dd2ff2aae4e4c2a9a43d7b83a0b1af8aa:/src/zipmap.c diff --git a/src/zipmap.c b/src/zipmap.c index 35faeabe..be780a82 100644 --- a/src/zipmap.c +++ b/src/zipmap.c @@ -374,14 +374,14 @@ void zipmapRepr(unsigned char *p) { l = zipmapDecodeLength(p); printf("{key %u}",l); p += zipmapEncodeLength(NULL,l); - fwrite(p,l,1,stdout); + if (l != 0 && fwrite(p,l,1,stdout) == 0) perror("fwrite"); p += l; l = zipmapDecodeLength(p); printf("{value %u}",l); p += zipmapEncodeLength(NULL,l); e = *p++; - fwrite(p,l,1,stdout); + if (l != 0 && fwrite(p,l,1,stdout) == 0) perror("fwrite"); p += l+e; if (e) { printf("[");