s4:torture: Fix size types in nss tests
authorAndreas Schneider <asn@samba.org>
Thu, 7 Dec 2017 16:54:12 +0000 (17:54 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 20 Mar 2018 22:16:15 +0000 (23:16 +0100)
This fixes compilation with -Wstrict-overflow=2

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/torture/local/nss_tests.c

index 2cd61225ab8bc5d6ba9b37b06a608df22699f8cd..cc02047d56567fd50d15981342365dc0a216965c 100644 (file)
@@ -899,7 +899,7 @@ static bool test_reentrant_enumeration_crosschecks(struct torture_context *tctx)
 
 static bool test_passwd_duplicates(struct torture_context *tctx)
 {
-       int i, d;
+       size_t i, d;
        struct passwd *pwd;
        size_t num_pwd;
        int duplicates = 0;
@@ -934,7 +934,7 @@ static bool test_passwd_duplicates(struct torture_context *tctx)
 
 static bool test_group_duplicates(struct torture_context *tctx)
 {
-       int i, d;
+       size_t i, d;
        struct group *grp;
        size_t num_grp;
        int duplicates = 0;