libcli: Align a few integer types
authorVolker Lendecke <vl@samba.org>
Sun, 29 Nov 2020 17:25:07 +0000 (18:25 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 30 Nov 2020 22:24:37 +0000 (22:24 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/util/doserr.c
libcli/util/errmap_unix.c
libcli/util/hresult.c

index 237854c148deb6f91c063b21a013a0d1fc490bda..99fd72225bf39ddc441705f94229e58937232fb2 100644 (file)
@@ -125,7 +125,7 @@ const char *win_errstr(WERROR werror)
 
 const char *get_friendly_werror_msg(WERROR werror)
 {
-       int i = 0;
+       size_t i = 0;
 
        for (i = 0; i < ARRAY_SIZE(dos_err_strs); i++) {
                if (W_ERROR_V(dos_err_strs[i].werror) ==
index 8f9f89835edbf7357371ffdddf0fdc9a410b1177..9ac680919d84936e4ebe613fe2a35bdb67707a46 100644 (file)
@@ -142,7 +142,7 @@ static const struct {
 *********************************************************************/
 NTSTATUS map_nt_error_from_unix_common(int unix_error)
 {
-       int i;
+       size_t i;
 
        /* Look through list */
        for (i=0;i<ARRAY_SIZE(unix_nt_errmap);i++) {
index 2bea98936f837ec41644edcc6f23abfc5885baa8..0ac116430b44325a48d3b5ab5a36b97179ae8ac7 100644 (file)
@@ -14676,7 +14676,7 @@ static const struct {
 const char *hresult_errstr_const(HRESULT err_code)
 {
        const char *result = NULL;
-       int i;
+       size_t i;
        for (i = 0; i < ARRAY_SIZE(hresult_errs); ++i) {
                if (HRES_IS_EQUAL(err_code, hresult_errs[i].error_code)) {
                        result = hresult_errs[i].error_message;
@@ -14694,7 +14694,7 @@ const char *hresult_errstr_const(HRESULT err_code)
 const char *hresult_errstr(HRESULT err_code)
 {
        static char msg[22];
-       int i;
+       size_t i;
 
        for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) {
                if (HRES_IS_EQUAL(err_code, hresult_errs[i].error_code)) {