diff options
| author | Ben Kaduk <kaduk@mit.edu> | 2012-06-27 16:35:20 -0400 |
|---|---|---|
| committer | Ben Kaduk <kaduk@mit.edu> | 2012-07-03 00:43:45 -0400 |
| commit | 149883bec140286d19751fbae7550043f754f4bb (patch) | |
| tree | 01fdc7b1521a2f7b76975b797fea86bb60c8f312 /src/plugins/kdb | |
| parent | e7aa25d215a9d4baa95643f2d19e44036e57af72 (diff) | |
| download | krb5-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.c | 2 |
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. */ |
