Skip to content

Commit

Permalink
fix bcmp error
Browse files Browse the repository at this point in the history
add register to args


git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1119 dc483132-0cff-0310-8789-dd5450dbe970
  • Loading branch information
jtkohl committed Sep 11, 1990
1 parent 38dce45 commit 263fe8d
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/lib/krb5/krb/faddr_ordr.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ static char rcsid_faddr_ordr_c[] =
*/
int
krb5_fulladdr_order(addr1, addr2)
const krb5_fulladdr *addr1;
const krb5_fulladdr *addr2;
register const krb5_fulladdr *addr1;
register const krb5_fulladdr *addr2;
{
int dir;
const int minlen = min(addr1->address->length, addr2->address->length);
register int i;

dir = addr1->address->addrtype - addr2->address->addrtype;
if (dir)
return(dir);
Expand All @@ -41,12 +44,14 @@ const krb5_fulladdr *addr2;
if (dir)
return(dir);

dir = bcmp((char *)addr1->address->contents,
(char *)addr2->address->contents,
min(addr1->address->length, addr2->address->length));
if (dir)
return(dir);

for (i = 0; i < minlen; i++) {
if ((unsigned char) addr1->address->contents[i] <
(unsigned char) addr2->address->contents[i])
return -1;
else if ((unsigned char) addr1->address->contents[i] >
(unsigned char) addr2->address->contents[i])
return 1;
}
if (addr1->port > addr2->port)
return(1);
else if (addr1->port < addr2->port)
Expand Down

0 comments on commit 263fe8d

Please sign in to comment.