forked from github/server
ufindhash negative ids assert
This commit is contained in:
parent
a59a80d35e
commit
1d47c99f18
1 changed files with 7 additions and 3 deletions
|
@ -659,9 +659,13 @@ uunhash (unit * u)
|
||||||
unit *
|
unit *
|
||||||
ufindhash (int i)
|
ufindhash (int i)
|
||||||
{
|
{
|
||||||
unit * u = unithash[i % UMAXHASH];
|
assert(i>=0);
|
||||||
while (u && u->no!=i) u = u->nexthash;
|
if (i>=0) {
|
||||||
return u;
|
unit * u = unithash[i % UMAXHASH];
|
||||||
|
while (u && u->no!=i) u = u->nexthash;
|
||||||
|
return u;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FMAXHASH 2039
|
#define FMAXHASH 2039
|
||||||
|
|
Loading…
Reference in a new issue