commit - fd86ad6ebc2672118d7b2b5611b55ed2bb279bc2
commit + 2793759294c2ec8056c179cf87f7158101cae15d
blob - 581695a88de890174ed3deef1c77af9ad991f974
blob + c1ce38c213a13c5547fb6643db2aa79a36185545
--- libexec/got-index-pack/got-index-pack.c
+++ libexec/got-index-pack/got-index-pack.c
b = base->data;
n = readvint(d, &d);
if(n != base->size){
- fprintf(stderr, "mismatched source size");
+ fprintf(stderr, "mismatched source size\n");
return -1;
}
break;
c = *d++;
if(!c){
- fprintf(stderr, "bad delta encoding");
+ fprintf(stderr, "bad delta encoding\n");
return -1;
}
/* copy from base */
}
if(r != er){
- fprintf(stderr, "truncated delta (%zd)", er - r);
+ fprintf(stderr, "truncated delta (%zd)\n", er - r);
return -1;
}
}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;
}
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){
}
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;
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;
}
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;
}