[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
- Re: [PATCH v1 45/59] 9pfs/9p.c: remove unneeded labels, (continued)
- [PATCH v1 46/59] alpha/typhoon.c: remove unneeded label in typhoon_translate_iommu(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 47/59] pvrdma_main.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 48/59] pvrdma_dev_ring.c: remove unneeded label in pvrdma_ring_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 49/59] rdma/rdma_rm.c: remove unneeded label in rdma_rm_alloc_pd(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 50/59] rdma/rdma_backend.c: remove unneeded label in rdma_backend_init(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 51/59] virtio/vhost.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 52/59] net/vhost_net.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 53/59] net/net_tx_pkt.c: remove unneeded label in net_tx_pkt_get_gso_type(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 54/59] ivshmem-server/main.c: remove unneeded label in main(),
Daniel Henrique Barboza <=
- [PATCH v1 55/59] linux-user/flatload.c: remove unused 'out' label, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 56/59] linux-user/signal.c: remove unneeded label in do_sigaltstack(), Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 57/59] linux-user/syscall.c: fix trailing whitespaces and style, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 58/59] linux-user/syscall.c: remove unneeded labels, Daniel Henrique Barboza, 2020/01/06
- [PATCH v1 59/59] linux-user/vm86.c: remove unneeded label in do_vm86(), Daniel Henrique Barboza, 2020/01/06
- Re: [PATCH v1 00/59] trivial unneeded labels cleanup, Corey Minyard, 2020/01/06