dvbv5-zap: Only go back if is there anything to clean
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 2 Mar 2013 12:39:39 +0000 (09:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 2 Mar 2013 15:26:31 +0000 (12:26 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/dvb/dvbv5-zap.c

index d3ddcef..d8e1872 100644 (file)
@@ -284,7 +284,7 @@ static int print_frontend_stats(struct arguments *args,
        uint32_t status = 0;
 
        /* Move cursor up and cleans down */
-       if (isatty(STDERR_FILENO))
+       if (isatty(STDERR_FILENO) && args->n_status_lines)
                fprintf(stderr, "\r\x1b[%dA\x1b[J", args->n_status_lines);
 
        args->n_status_lines = 0;