]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xentrace: remove return value from monitor_tbufs
authorOlaf Hering <olaf@aepfle.de>
Wed, 31 May 2023 16:06:56 +0000 (17:06 +0100)
committerGeorge Dunlap <george.dunlap@cloud.com>
Wed, 31 May 2023 16:06:56 +0000 (17:06 +0100)
The program is structured so that fatal errors cause exit() to be
called directly, rather than being passed up the stack; returning a
value here may mislead people into believing otherwise.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: George Dunlap <george.dunlap@cloud.com>
tools/xentrace/xentrace.c

index b81abe8a51408b214399f64711f5bfd86a388f76..a073cab26d61a5bc023346d044b21474e861d370 100644 (file)
@@ -668,7 +668,7 @@ static void wait_for_event_or_timeout(unsigned long milliseconds)
  * monitor_tbufs - monitor the contents of tbufs and output to a file
  * @logfile:       the FILE * representing the file to log to
  */
-static int monitor_tbufs(void)
+static void monitor_tbufs(void)
 {
     int i;
 
@@ -795,8 +795,6 @@ static int monitor_tbufs(void)
     free(data);
     /* don't need to munmap - cleanup is automatic */
     close(outfd);
-
-    return 0;
 }
 
 
@@ -1164,7 +1162,6 @@ static void parse_args(int argc, char **argv)
 
 int main(int argc, char **argv)
 {
-    int ret;
     struct sigaction act;
 
     opts.outfile = 0;
@@ -1226,9 +1223,9 @@ int main(int argc, char **argv)
     sigaction(SIGINT,  &act, NULL);
     sigaction(SIGALRM, &act, NULL);
 
-    ret = monitor_tbufs();
+    monitor_tbufs();
 
-    return ret;
+    return 0;
 }
 
 /*