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;
|
retried = 0;
|
||||||
retry:
|
retry:
|
||||||
for(i = 0; i < npackf; i++){
|
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)
|
if((f = openpack(&packf[i])) == nil)
|
||||||
goto error;
|
goto error;
|
||||||
if((r = Bseek(f, o, 0)) != -1)
|
if((r = Bseek(f, o, 0)) != -1)
|
||||||
|
|
|
@ -350,7 +350,6 @@ main(int argc, char **argv)
|
||||||
vlong date;
|
vlong date;
|
||||||
Object *t;
|
Object *t;
|
||||||
|
|
||||||
gitinit();
|
|
||||||
gitinit();
|
gitinit();
|
||||||
if(access(".git", AEXIST) != 0)
|
if(access(".git", AEXIST) != 0)
|
||||||
sysfatal("could not find git repo: %r");
|
sysfatal("could not find git repo: %r");
|
||||||
|
|
|
@ -67,7 +67,8 @@ eamalloc(ulong n, ulong sz)
|
||||||
uvlong na;
|
uvlong na;
|
||||||
void *v;
|
void *v;
|
||||||
|
|
||||||
if((na = (uvlong)n*(uvlong)sz) >= (1ULL<<30))
|
na = (uvlong)n*(uvlong)sz;
|
||||||
|
if(na >= (1ULL<<30))
|
||||||
sysfatal("alloc: overflow");
|
sysfatal("alloc: overflow");
|
||||||
v = mallocz(na, 1);
|
v = mallocz(na, 1);
|
||||||
if(v == nil)
|
if(v == nil)
|
||||||
|
@ -94,7 +95,8 @@ earealloc(void *p, ulong n, ulong sz)
|
||||||
uvlong na;
|
uvlong na;
|
||||||
void *v;
|
void *v;
|
||||||
|
|
||||||
if((na = (uvlong)n*(uvlong)sz) >= (1ULL<<30))
|
na = (uvlong)n*(uvlong)sz;
|
||||||
|
if(na >= (1ULL<<30))
|
||||||
sysfatal("alloc: overflow");
|
sysfatal("alloc: overflow");
|
||||||
v = realloc(p, na);
|
v = realloc(p, na);
|
||||||
if(v == nil)
|
if(v == nil)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue