summaryrefslogtreecommitdiffstats
path: root/usr.bin/rdist/lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/rdist/lookup.c')
-rw-r--r--usr.bin/rdist/lookup.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/rdist/lookup.c b/usr.bin/rdist/lookup.c
index 9819e68..dc2f134 100644
--- a/usr.bin/rdist/lookup.c
+++ b/usr.bin/rdist/lookup.c
@@ -59,7 +59,7 @@ define(name)
{
register char *cp, *s;
register struct namelist *nl;
- struct namelist *value;
+ struct namelist *value = NULL;
if (debug)
printf("define(%s)\n", name);
@@ -129,7 +129,7 @@ lookup(name, action, value)
char buf[256];
if (debug)
- printf("lookup(%s, %d, %x)\n", name, action, value);
+ printf("lookup(%s, %d, %p)\n", name, action, value);
n = 0;
for (cp = name; *cp; )
@@ -141,7 +141,8 @@ lookup(name, action, value)
continue;
if (action != LOOKUP) {
if (action != INSERT || s->s_type != CONST) {
- (void)sprintf(buf, "%s redefined", name);
+ (void)snprintf(buf, sizeof(buf),
+ "%s redefined", name);
yyerror(buf);
}
}
@@ -149,7 +150,7 @@ lookup(name, action, value)
}
if (action == LOOKUP) {
- (void)sprintf(buf, "%s undefined", name);
+ (void)snprintf(buf, sizeof(buf), "%s undefined", name);
yyerror(buf);
return(NULL);
}
OpenPOWER on IntegriCloud