Fix asprintf and scanf ignoring return value
[ust.git] / tests / hello / hello.c
index 8147860a9c9f36716b60e6249f15564802d0fd10..7eecf69e83f0bbaf23949a71e191806bf884687a 100644 (file)
@@ -77,13 +77,15 @@ int main()
                usleep(100000);
        }
 
-       scanf("%*s");
+       if (scanf("%*s") == EOF)
+               PERROR("scanf failed");
 
        ltt_trace_stop("auto");
        ltt_trace_destroy("auto", 0);
 
        DBG("TRACE STOPPED");
-       scanf("%*s");
+       if (scanf("%*s") == EOF)
+               PERROR("scanf failed");
 
        return 0;
 }
This page took 0.022699 seconds and 4 git commands to generate.