strtoul replace with strtol
authorLuke Leighton <lkcl@samba.org>
Fri, 16 Oct 1998 21:46:07 +0000 (21:46 +0000)
committerLuke Leighton <lkcl@samba.org>
Fri, 16 Oct 1998 21:46:07 +0000 (21:46 +0000)
(This used to be commit 4ebd2c5140e782ec43d9f7700bd588dfa52a16c7)

source3/rpcclient/cmd_samr.c
source3/rpcclient/cmd_srvsvc.c

index 5c69c4676c3eaf43a0d5578227f0ceb0e7b2a345..877abce66ee11b5df75c77da3c40414e0707e5c6 100644 (file)
@@ -212,22 +212,22 @@ void cmd_sam_enum_users(struct client_info *info)
 #ifdef DEBUG_TESTING
        if (next_token(NULL, tmp, NULL, sizeof(tmp)))
        {
-               num_entries = (uint16)strtoul(tmp, (char**)NULL, 16);
+               num_entries = (uint16)strtol(tmp, (char**)NULL, 16);
        }
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)))
        {
-               unk_0 = (uint16)strtoul(tmp, (char**)NULL, 16);
+               unk_0 = (uint16)strtol(tmp, (char**)NULL, 16);
        }
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)))
        {
-               acb_mask = (uint16)strtoul(tmp, (char**)NULL, 16);
+               acb_mask = (uint16)strtol(tmp, (char**)NULL, 16);
        }
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)))
        {
-               unk_1 = (uint16)strtoul(tmp, (char**)NULL, 16);
+               unk_1 = (uint16)strtol(tmp, (char**)NULL, 16);
        }
 #endif
 
@@ -373,8 +373,8 @@ void cmd_sam_query_user(struct client_info *info)
        if (next_token(NULL, rid_str , NULL, sizeof(rid_str )) &&
            next_token(NULL, info_str, NULL, sizeof(info_str)))
        {
-               user_rid   = strtoul(rid_str , (char**)NULL, 16);
-               info_level = strtoul(info_str, (char**)NULL, 10);
+               user_rid   = (uint32)strtol(rid_str , (char**)NULL, 16);
+               info_level = (uint32)strtol(info_str, (char**)NULL, 10);
        }
 
        fprintf(out_hnd, "SAM Query User: rid %x info level %d\n",
@@ -463,7 +463,7 @@ void cmd_sam_query_groups(struct client_info *info)
 
        if (next_token(NULL, info_str, NULL, sizeof(info_str)))
        {
-               switch_value = strtoul(info_str, (char**)NULL, 10);
+               switch_value = (uint32)strtol(info_str, (char**)NULL, 10);
        }
 
        fprintf(out_hnd, "SAM Query Groups: info level %d\n", switch_value);
index 65d49984bf9edfe9e57ca7d85eee808941da7eae..f385cecb68d6efe3a2827aae8a07e8675d980b00 100644 (file)
@@ -58,7 +58,7 @@ void cmd_srv_query_info(struct client_info *info)
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)-1))
        {
-               info_level = strtoul(tmp, (char**)NULL, 10);
+               info_level = (uint32)strtol(tmp, (char**)NULL, 10);
        }
 
        DEBUG(4,("cmd_srv_query_info: server:%s info level: %d\n",
@@ -116,7 +116,7 @@ void cmd_srv_enum_conn(struct client_info *info)
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)-1))
        {
-               info_level = strtoul(tmp, (char**)NULL, 10);
+               info_level = (uint32)strtol(tmp, (char**)NULL, 10);
        }
 
        DEBUG(4,("cmd_srv_enum_conn: server:%s info level: %d\n",
@@ -176,7 +176,7 @@ void cmd_srv_enum_shares(struct client_info *info)
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)-1))
        {
-               info_level = strtoul(tmp, (char**)NULL, 10);
+               info_level = (uint32)strtol(tmp, (char**)NULL, 10);
        }
 
        DEBUG(4,("cmd_srv_enum_shares: server:%s info level: %d\n",
@@ -236,7 +236,7 @@ void cmd_srv_enum_sess(struct client_info *info)
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)-1))
        {
-               info_level = strtoul(tmp, (char**)NULL, 10);
+               info_level = (uint32)strtol(tmp, (char**)NULL, 10);
        }
 
        DEBUG(4,("cmd_srv_enum_sess: server:%s info level: %d\n",
@@ -288,7 +288,7 @@ void cmd_srv_enum_files(struct client_info *info)
 
        if (next_token(NULL, tmp, NULL, sizeof(tmp)-1))
        {
-               info_level = strtoul(tmp, (char**)NULL, 10);
+               info_level = (uint32)strtol(tmp, (char**)NULL, 10);
        }
 
        DEBUG(4,("cmd_srv_enum_files: server:%s info level: %d\n",