git: avoid uninterruptible temporary warning

dont' fall into the rathole.
This commit is contained in:
Ori Bernstein 2021-06-06 23:50:45 +00:00
parent 8d578014cf
commit 8aa69e55b6
3 changed files with 6 additions and 4 deletions

View file

@ -1000,7 +1000,8 @@ readidxobject(Biobuf *idx, Hash h, int flag)
retried = 0;
retry:
for(i = 0; i < npackf; i++){
if((o = searchindex(packf[i].idx, packf[i].nidx, h)) != -1){
o = searchindex(packf[i].idx, packf[i].nidx, h);
if(o != -1){
if((f = openpack(&packf[i])) == nil)
goto error;
if((r = Bseek(f, o, 0)) != -1)

View file

@ -350,7 +350,6 @@ main(int argc, char **argv)
vlong date;
Object *t;
gitinit();
gitinit();
if(access(".git", AEXIST) != 0)
sysfatal("could not find git repo: %r");

View file

@ -67,7 +67,8 @@ eamalloc(ulong n, ulong sz)
uvlong na;
void *v;
if((na = (uvlong)n*(uvlong)sz) >= (1ULL<<30))
na = (uvlong)n*(uvlong)sz;
if(na >= (1ULL<<30))
sysfatal("alloc: overflow");
v = mallocz(na, 1);
if(v == nil)
@ -94,7 +95,8 @@ earealloc(void *p, ulong n, ulong sz)
uvlong na;
void *v;
if((na = (uvlong)n*(uvlong)sz) >= (1ULL<<30))
na = (uvlong)n*(uvlong)sz;
if(na >= (1ULL<<30))
sysfatal("alloc: overflow");
v = realloc(p, na);
if(v == nil)