All of lore.kernel.org
 help / color / mirror / Atom feed
From: Donald Yandt <donald.yandt@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Donald Yandt <donald.yandt@gmail.com>
Subject: [PATCH conntrack-tools 3/3] conntrackd: exit with failure status
Date: Fri,  1 Mar 2024 12:07:31 -0500	[thread overview]
Message-ID: <20240301170731.21657-4-donald.yandt@gmail.com> (raw)
In-Reply-To: <20240301170731.21657-1-donald.yandt@gmail.com>

Signed-off-by: Donald Yandt <donald.yandt@gmail.com>
---
 src/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main.c b/src/main.c
index de4773d..c6b2600 100644
--- a/src/main.c
+++ b/src/main.c
@@ -175,7 +175,7 @@ int main(int argc, char *argv[])
 			}
 			show_usage(argv[0]);
 			dlog(LOG_ERR, "Missing config filename");
-			break;
+			exit(EXIT_FAILURE);
 		case 'F':
 			set_operation_mode(&type, REQUEST, argv);
 			i = set_action_by_table(i, argc, argv,
@@ -309,8 +309,7 @@ int main(int argc, char *argv[])
 		default:
 			show_usage(argv[0]);
 			dlog(LOG_ERR, "Unknown option: %s", argv[i]);
-			return 0;
-			break;
+			exit(EXIT_FAILURE);
 		}
 	}
 
-- 
2.44.0


      parent reply	other threads:[~2024-03-01 17:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 17:07 [PATCH conntrack-tools 0/3] fix potential memory loss and exit codes Donald Yandt
2024-03-01 17:07 ` [PATCH conntrack-tools 1/3] conntrackd: prevent memory loss if reallocation fails Donald Yandt
2024-03-02  9:54   ` Pablo Neira Ayuso
2024-03-02 16:26     ` Donald Yandt
2024-03-01 17:07 ` [PATCH conntrack-tools 2/3] conntrackd: use size_t for element indices Donald Yandt
2024-03-02  9:53   ` Pablo Neira Ayuso
2024-03-02 16:20     ` Donald Yandt
2024-03-04 12:35       ` Pablo Neira Ayuso
2024-03-01 17:07 ` Donald Yandt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240301170731.21657-4-donald.yandt@gmail.com \
    --to=donald.yandt@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.