From 5f1f34ae1a227edbb4b0bba7fe99009d4efd94bd Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 1 Mar 2015 16:43:01 -0600 Subject: Fix several printf_format warnings. --- toys/other/factor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'toys/other/factor.c') diff --git a/toys/other/factor.c b/toys/other/factor.c index bf454b44..570270ed 100644 --- a/toys/other/factor.c +++ b/toys/other/factor.c @@ -22,12 +22,15 @@ static void factor(char *s) long l, ll; for (;;) { + char *err = s; + while(isspace(*s)) s++; if (!*s) return; l = strtol(s, &s, 0); if (*s && !isspace(*s)) { - error_msg("%s: not integer"); + error_msg("%s: not integer", err); + return; } -- cgit v1.2.3