From: Olaf Hering Date: Wed, 31 May 2023 16:06:56 +0000 (+0100) Subject: xentrace: remove return value from monitor_tbufs X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f53c498276588c2aced36d5baa61e4a24e8d1bf8;p=people%2Froyger%2Fxen.git xentrace: remove return value from monitor_tbufs 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 Reviewed-by: George Dunlap --- diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index b81abe8a51..a073cab26d 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -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; } /*