lib: Align integer types
authorVolker Lendecke <vl@samba.org>
Sun, 19 Jan 2020 10:50:57 +0000 (11:50 +0100)
committerJeremy Allison <jra@samba.org>
Sun, 19 Jan 2020 18:29:39 +0000 (18:29 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/errmap_unix.c
source3/libsmb/errormap.c

index 9eb30f7b814243c74dcdde2af8b8479f4dccde18..5a6dd245023f34fdd8ab6898368f2535c7add2ef 100644 (file)
@@ -126,7 +126,7 @@ static const struct {
 
 NTSTATUS map_nt_error_from_unix(int unix_error)
 {
-       int i = 0;
+       size_t i = 0;
 
        if (unix_error == 0) {
                /* we map this to an error, not success, as this
@@ -264,7 +264,7 @@ static const struct {
 
 int map_errno_from_nt_status(NTSTATUS status)
 {
-       int i;
+       size_t i;
        DEBUG(10,("map_errno_from_nt_status: 32 bit codes: code=%08x\n",
                NT_STATUS_V(status)));
 
index ce3bb95220779d3250a0337598786fd8d8636d75..ba8bc659bab5679ff8a2cb2474bb843c9a0f830c 100644 (file)
@@ -283,7 +283,7 @@ convert a dos eclas/ecode to a NT status32 code
  *****************************************************************************/
 NTSTATUS dos_to_ntstatus(uint8_t eclass, uint32_t ecode)
 {
-       int i;
+       size_t i;
        if (eclass == 0) return NT_STATUS_OK;
        for (i=0; i < ARRAY_SIZE(dos_to_ntstatus_map); i++) {
                if (eclass == dos_to_ntstatus_map[i].dos_class &&