From: Derrick Brashear Date: Fri, 7 Sep 2012 20:47:43 +0000 (-0400) Subject: uuid: hashes are positive ints X-Git-Tag: openafs-stable-1_8_0pre1~2029 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=772e957b7196a214bcb39f06e9c864c6e5a02ac5 uuid: hashes are positive ints switch to unsigned Change-Id: I2a2dbde211d1de2c73bcf5fd0c9ef1704d0e0000 Reviewed-on: http://gerrit.openafs.org/8060 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/opr/uuid.c b/src/opr/uuid.c index 2b26efe..433723c 100644 --- a/src/opr/uuid.c +++ b/src/opr/uuid.c @@ -55,7 +55,7 @@ opr_uuid_equal(const opr_uuid_t *uuid1, const opr_uuid_t *uuid2) return memcmp(uuid1, uuid2, sizeof(opr_uuid_t)) == 0; } -int +unsigned int opr_uuid_hash(const opr_uuid_t *uuid) { /* uuid->data is a (unsigned char *), so there's every danger that this diff --git a/src/opr/uuid.h b/src/opr/uuid.h index c69711b..b526a1a 100644 --- a/src/opr/uuid.h +++ b/src/opr/uuid.h @@ -24,7 +24,7 @@ typedef opr_uuid_t opr_uuid; /* For XDR */ extern void opr_uuid_create(opr_uuid_t *uuid); extern int opr_uuid_isNil(const opr_uuid_t *uuid); extern int opr_uuid_equal(const opr_uuid_t *uuid1, const opr_uuid_t *uuid2); -extern int opr_uuid_hash(const opr_uuid_t *uuid); +extern unsigned int opr_uuid_hash(const opr_uuid_t *uuid); #if !defined(KERNEL) extern void opr_uuid_toString(const opr_uuid_t *uuid, char **string);