summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-05-08 09:31:51 +0200
committerKarolin Seeger <kseeger@samba.org>2018-06-20 09:22:24 +0200
commit15c13f7372ca6c980d38a3be83225eb3cfd18f21 (patch)
treee18402463891362c97347102ef65a8e664ef5536 /lib
parent05dab794c2f15701f5ecb3909e4fa714b74c16c8 (diff)
downloadsamba-15c13f7372ca6c980d38a3be83225eb3cfd18f21.tar.gz
lib:util: Fix size types in debug.c
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> (cherry picked from commit fb6cd9c44ac6fcc9f6abe3b63fc742aeac42969a)
Diffstat (limited to 'lib')
-rw-r--r--lib/util/debug.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/util/debug.c b/lib/util/debug.c
index d010b724203..b58303e8c82 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -480,8 +480,8 @@ static void debug_set_backends(const char *param)
static void debug_backends_log(const char *msg, int msg_level)
{
char msg_no_nl[FORMAT_BUFR_SIZE];
- unsigned i;
- int len;
+ size_t i;
+ size_t len;
/*
* Some backends already add an extra newline, so also provide
@@ -551,7 +551,7 @@ static const char *default_classname_table[] = {
*/
static const int debug_class_list_initial[ARRAY_SIZE(default_classname_table)];
-static int debug_num_classes = 0;
+static size_t debug_num_classes = 0;
int *DEBUGLEVEL_CLASS = discard_const_p(int, debug_class_list_initial);
@@ -630,7 +630,7 @@ utility lists registered debug class names's
char *debug_list_class_names_and_levels(void)
{
char *buf = NULL;
- int i;
+ size_t i;
/* prepare strings */
for (i = 0; i < debug_num_classes; i++) {
buf = talloc_asprintf_append(buf,
@@ -651,7 +651,7 @@ char *debug_list_class_names_and_levels(void)
static int debug_lookup_classname_int(const char* classname)
{
- int i;
+ size_t i;
if (!classname) return -1;
@@ -741,7 +741,7 @@ static int debug_lookup_classname(const char *classname)
static void debug_dump_status(int level)
{
- int q;
+ size_t q;
DEBUG(level, ("INFO: Current debug levels:\n"));
for (q = 0; q < debug_num_classes; q++) {
@@ -790,7 +790,7 @@ bool debug_parse_levels(const char *params_str)
size_t str_len = strlen(params_str);
char str[str_len+1];
char *tok, *saveptr;
- int i;
+ size_t i;
/* Just in case */
debug_init();