diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-11-06 18:35:17 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-02 18:02:00 +0100 |
commit | e50c9826794f4a80b7200712afacb0752ccf8d6f (patch) | |
tree | 599e14ecbd512cfbf5fde5e7af9edb9fb6f97e36 /source4/lib/ldb/nssldb | |
parent | 5c73ecd2b3b178dd57d7251342e966ea4f8044e0 (diff) | |
download | samba-e50c9826794f4a80b7200712afacb0752ccf8d6f.tar.gz samba-e50c9826794f4a80b7200712afacb0752ccf8d6f.tar.bz2 samba-e50c9826794f4a80b7200712afacb0752ccf8d6f.zip |
LDB:NSS - make LDB "signed-safe" on counter variables
"i" needs to be unsigned on both places since it counts till a "count" variable
of a "struct ldb_result" object which itself is unsigned.
I see counting variables much better as "unsigned" since in most cases we don't
use negative values at all. We've only to be careful on binary searches and
downto counts regarding them.
Diffstat (limited to 'source4/lib/ldb/nssldb')
-rw-r--r-- | source4/lib/ldb/nssldb/ldb-nss.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/ldb/nssldb/ldb-nss.c b/source4/lib/ldb/nssldb/ldb-nss.c index 8f7321031b..92b0635561 100644 --- a/source4/lib/ldb/nssldb/ldb-nss.c +++ b/source4/lib/ldb/nssldb/ldb-nss.c @@ -191,7 +191,7 @@ NSS_STATUS _ldb_nss_fill_group(struct group *result, size_t len; size_t bufpos; size_t lsize; - int i; + unsigned int i; bufpos = 0; @@ -280,7 +280,7 @@ NSS_STATUS _ldb_nss_fill_initgr(gid_t group, struct ldb_result *grlist) { NSS_STATUS ret; - int i; + unsigned int i; for (i = 0; i < grlist->count; i++) { |