qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main()


From: Daniel Henrique Barboza
Subject: [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main()
Date: Mon, 6 Jan 2020 15:24:20 -0300

'err' can be replaced by 'return 1'.

Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
 contrib/ivshmem-server/main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/contrib/ivshmem-server/main.c b/contrib/ivshmem-server/main.c
index e4cd35f74c..b491e8237f 100644
--- a/contrib/ivshmem-server/main.c
+++ b/contrib/ivshmem-server/main.c
@@ -217,7 +217,7 @@ main(int argc, char *argv[])
     if (sigemptyset(&sa.sa_mask) == -1 ||
         sigaction(SIGPIPE, &sa, 0) == -1) {
         perror("failed to ignore SIGPIPE; sigaction");
-        goto err;
+        return 1;
     }
 
     sa_quit.sa_handler = ivshmem_server_quit_cb;
@@ -226,7 +226,7 @@ main(int argc, char *argv[])
         sigaction(SIGTERM, &sa_quit, 0) == -1 ||
         sigaction(SIGINT, &sa_quit, 0) == -1) {
         perror("failed to add signal handler; sigaction");
-        goto err;
+        return 1;
     }
 
     /* init the ivshms structure */
@@ -234,13 +234,13 @@ main(int argc, char *argv[])
                             args.shm_path, args.use_shm_open,
                             args.shm_size, args.n_vectors, args.verbose) < 0) {
         fprintf(stderr, "cannot init server\n");
-        goto err;
+        return 1;
     }
 
     /* start the ivshmem server (open shm & unix socket) */
     if (ivshmem_server_start(&server) < 0) {
         fprintf(stderr, "cannot bind\n");
-        goto err;
+        return 1;
     }
 
     /* daemonize if asked to */
@@ -269,6 +269,5 @@ main(int argc, char *argv[])
 
 err_close:
     ivshmem_server_close(&server);
-err:
     return ret;
 }
-- 
2.24.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]