From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: phil@nwl.cc
Subject: [PATCH nft 2/3] main: replace NFT_EXIT_NOMEM by EXIT_FAILURE
Date: Fri, 5 Jul 2019 00:59:19 +0200 [thread overview]
Message-ID: <20190704225920.3671-2-pablo@netfilter.org> (raw)
In-Reply-To: <20190704225920.3671-1-pablo@netfilter.org>
The main.c file always uses either EXIT_FAILURE or EXIT_SUCCESS, replace
this.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 694611224d07..9db3d9aa0a15 100644
--- a/src/main.c
+++ b/src/main.c
@@ -19,7 +19,6 @@
#include <sys/types.h>
#include <nftables/libnftables.h>
-#include <nftables.h>
#include <utils.h>
#include <cli.h>
@@ -307,7 +306,7 @@ int main(int argc, char * const *argv)
if (buf == NULL) {
fprintf(stderr, "%s:%u: Memory allocation failure\n",
__FILE__, __LINE__);
- exit(NFT_EXIT_NOMEM);
+ exit(EXIT_FAILURE);
}
for (i = optind; i < argc; i++) {
strcat(buf, argv[i]);
--
2.11.0
next prev parent reply other threads:[~2019-07-04 22:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 22:59 [PATCH nft 1/3,v2] src: use malloc() and free() from cli and main Pablo Neira Ayuso
2019-07-04 22:59 ` Pablo Neira Ayuso [this message]
2019-07-04 22:59 ` [PATCH nft 3/3] cli: remove useless #include headers Pablo Neira Ayuso
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=20190704225920.3671-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).