summaryrefslogtreecommitdiffstats
path: root/src/plugins/kdb
diff options
context:
space:
mode:
authorBen Kaduk <kaduk@mit.edu>2012-06-27 16:35:20 -0400
committerBen Kaduk <kaduk@mit.edu>2012-07-03 00:43:45 -0400
commit149883bec140286d19751fbae7550043f754f4bb (patch)
tree01fdc7b1521a2f7b76975b797fea86bb60c8f312 /src/plugins/kdb
parente7aa25d215a9d4baa95643f2d19e44036e57af72 (diff)
downloadkrb5-149883bec140286d19751fbae7550043f754f4bb.tar.gz
krb5-149883bec140286d19751fbae7550043f754f4bb.tar.xz
krb5-149883bec140286d19751fbae7550043f754f4bb.zip
Minor cleanups relating to size_t being unsigned
In order to use -1 as a sentinel value, we should explicitly cast to make it clear what we are doing. It might be better to use a less convoluted sentinel value such as SIZE_T_MAX, though. Additionally, since size_t is unsigned and at least as wide as an int, a loop with int index variable that compares against a size_t for its termination check could become an infinite loop. Make the loop index size_t for consistency.
Diffstat (limited to 'src/plugins/kdb')
-rw-r--r--src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c b/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c
index 6874f4703..e6aa03525 100644
--- a/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c
+++ b/src/plugins/kdb/db2/libdb2/hash/hash_bigkey.c
@@ -277,7 +277,7 @@ __big_keydata(hashp, pagep, key, val, ndx)
key->data = hashp->bigkey_buf;
__put_page(hashp, key_pagep, A_RAW, 0);
- if (key->size == -1)
+ if (key->size == (size_t)-1)
return (-1);
/* Create an item_info to direct __big_return to the beginning pgno. */