1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-07 09:49:30 +03:00

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.
This commit is contained in:
Matthias Dieter Wallnöfer
2009-11-06 18:35:17 +01:00
parent 5c73ecd2b3
commit e50c982679

View File

@ -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++) {