commit 2793759294c2ec8056c179cf87f7158101cae15d from: Stefan Sperling date: Wed Mar 18 16:11:28 2020 UTC add more missing \n in fprintfs from got-index-pack commit - fd86ad6ebc2672118d7b2b5611b55ed2bb279bc2 commit + 2793759294c2ec8056c179cf87f7158101cae15d blob - 581695a88de890174ed3deef1c77af9ad991f974 blob + c1ce38c213a13c5547fb6643db2aa79a36185545 --- libexec/got-index-pack/got-index-pack.c +++ libexec/got-index-pack/got-index-pack.c @@ -459,7 +459,7 @@ applydelta(Object *dst, Object *base, char *d, int nd) b = base->data; n = readvint(d, &d); if(n != base->size){ - fprintf(stderr, "mismatched source size"); + fprintf(stderr, "mismatched source size\n"); return -1; } @@ -478,7 +478,7 @@ applydelta(Object *dst, Object *base, char *d, int nd) break; c = *d++; if(!c){ - fprintf(stderr, "bad delta encoding"); + fprintf(stderr, "bad delta encoding\n"); return -1; } /* copy from base */ @@ -509,7 +509,7 @@ applydelta(Object *dst, Object *base, char *d, int nd) } if(r != er){ - fprintf(stderr, "truncated delta (%zd)", er - r); + fprintf(stderr, "truncated delta (%zd)\n", er - r); return -1; } @@ -568,7 +568,7 @@ readodelta(FILE *f, Object *o, off_t nd, off_t p, int }while(c & 0x80); if(r > p){ - fprintf(stderr, "junk offset -%lld (from %lld)", r, p); + fprintf(stderr, "junk offset -%lld (from %lld)\n", r, p); goto error; } @@ -609,7 +609,7 @@ readpacked(FILE *f, Object *o, int flag) s = 4; t = (c >> 4) & 0x7; if(!t){ - fprintf(stderr, "unknown type for byte %x", c); + fprintf(stderr, "unknown type for byte %x\n", c); return -1; } while(c & 0x80){ @@ -695,11 +695,11 @@ readloose(FILE *f, Object *o, int flag) } sz = strtol(s, &e, 0); if(e == s || *e++ != 0){ - fprintf(stderr, "malformed object header"); + fprintf(stderr, "malformed object header\n"); goto error; } if(sz != n - (e - (char *)d)){ - fprintf(stderr, "mismatched sizes"); + fprintf(stderr, "mismatched sizes\n"); goto error; } o->size = sz; @@ -993,7 +993,7 @@ readidxobject(FILE *idx, struct got_object_id h, int f fclose(f); parseobject(obj); hashfmt(hbuf, sizeof(hbuf), &obj->hash); - fprintf(stderr, "object %s cached", hbuf); + fprintf(stderr, "object %s cached\n", hbuf); cache(obj); return obj; } @@ -1101,11 +1101,11 @@ indexpack(int packfd, int idxfd, struct got_object_id if (fseek(f, 0, SEEK_SET) == -1) return -1; if (fread(hdr, 1, sizeof(hdr), f) != sizeof(hdr)) { - fprintf(stderr, "short read on header"); + fprintf(stderr, "short read on header\n"); return -1; } if (memcmp(hdr, "PACK\0\0\0\2", 8) != 0) { - fprintf(stderr, "invalid header"); + fprintf(stderr, "invalid header\n"); return -1; }