From ea9f44148897b1a4601f6666c21597758cda6db9 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Tue, 29 May 2012 20:03:31 -0400 Subject: [PATCH] pwmc: fix showing duplicate status messages. --- src/pwmc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pwmc.c b/src/pwmc.c index e2166fdd..35d9c517 100644 --- a/src/pwmc.c +++ b/src/pwmc.c @@ -343,9 +343,7 @@ static int status_msg_cb(void *data, const char *line) char *p1 = strchr(p, ' '); int a = strtol(p, NULL, 10); - if (!isdigit(*p)) - fprintf(stderr, "%s\n", line); - else if (p1) { + if (isdigit(*p) && p1) { int b = strtol(p1, NULL, 10); char l[64] = {0}; int t = a && b ? a*100/b : 0; -- 2.11.4.GIT