From: Hallvard Furuseth Date: Mon, 18 Jul 2005 05:48:21 +0000 (+0000) Subject: Make ConfigArgs.lineno int like elsewhere instead of unsigned long X-Git-Tag: OPENLDAP_AC_BP~368 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae3ef7b3cd31c57d998b0dae1da84282b47fb5d2;p=openldap Make ConfigArgs.lineno int like elsewhere instead of unsigned long --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 97f2c8b8f3..13091fcc67 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -2279,7 +2279,7 @@ config_updateref(ConfigArgs *c) { static int config_include(ConfigArgs *c) { - unsigned long savelineno = c->lineno; + int savelineno = c->lineno; int rc; ConfigFile *cf; ConfigFile *cfsave = cfn; diff --git a/servers/slapd/config.c b/servers/slapd/config.c index fa3a2c2e24..5bf7b3992e 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -609,7 +609,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft) continue; } - snprintf( c->log, sizeof( c->log ), "%s: line %lu", + snprintf( c->log, sizeof( c->log ), "%s: line %d", c->fname, c->lineno ); c->argc = 0; @@ -1117,7 +1117,7 @@ fp_parse_line(ConfigArgs *c) if(token) for(i = 0; hide[i]; i++) if(!strcasecmp(token, hide[i])) break; if(quote_ptr) *quote_ptr = ' '; - Debug(LDAP_DEBUG_CONFIG, "line %lu (%s%s)\n", c->lineno, + Debug(LDAP_DEBUG_CONFIG, "line %d (%s%s)\n", c->lineno, hide[i] ? hide[i] : c->line, hide[i] ? " ***" : ""); if(quote_ptr) *quote_ptr = '\0'; @@ -1126,7 +1126,7 @@ fp_parse_line(ConfigArgs *c) char **tmp; tmp = ch_realloc(c->argv, (c->argv_size + ARGS_STEP) * sizeof(*c->argv)); if(!tmp) { - Debug(LDAP_DEBUG_ANY, "line %lu: out of memory\n", c->lineno, 0, 0); + Debug(LDAP_DEBUG_ANY, "line %d: out of memory\n", c->lineno, 0, 0); return -1; } c->argv = tmp; diff --git a/servers/slapd/config.h b/servers/slapd/config.h index 6b14c07aa0..3dc2592803 100644 --- a/servers/slapd/config.h +++ b/servers/slapd/config.h @@ -109,7 +109,7 @@ typedef struct config_args_s { char *line; char *tline; const char *fname; - unsigned long lineno; + int lineno; char log[MAXPATHLEN + STRLENOF(": line 18446744073709551615") + 1]; char msg[SLAP_TEXT_BUFLEN]; int depth;