git: avoid uninterruptible temporary warning
dont' fall into the rathole.
This commit is contained in:
parent
8d578014cf
commit
8aa69e55b6
3 changed files with 6 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue