From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 3/4] alfred: Test for failed global memory allocation
Date: Wed, 17 Oct 2012 21:55:57 +0200 [thread overview]
Message-ID: <1350503758-20685-3-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <1350503758-20685-1-git-send-email-sven@narfation.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main.c b/main.c
index 96e401a..ccb72cd 100644
--- a/main.c
+++ b/main.c
@@ -67,11 +67,11 @@ struct globals *alfred_init(int argc, char *argv[])
};
globals = malloc(sizeof(*globals));
- memset(globals, 0, sizeof(*globals));
-
if (!globals)
return NULL;
+ memset(globals, 0, sizeof(*globals));
+
globals->opmode = OPMODE_SLAVE;
globals->clientmode = CLIENT_NONE;
globals->interface = NULL;
--
1.7.10.4
next prev parent reply other threads:[~2012-10-17 19:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-17 19:55 [B.A.T.M.A.N.] [PATCH 1/4] alfred: Prepare makefile for distibutions Sven Eckelmann
2012-10-17 19:55 ` [B.A.T.M.A.N.] [PATCH 2/4] alfred: Fix parsing of short program parameter -v and -V Sven Eckelmann
2012-10-17 20:17 ` Simon Wunderlich
2012-10-17 19:55 ` Sven Eckelmann [this message]
2012-10-17 20:17 ` [B.A.T.M.A.N.] [PATCH 3/4] alfred: Test for failed global memory allocation Simon Wunderlich
2012-10-17 19:55 ` [B.A.T.M.A.N.] [PATCH 4/4] alfred: Fix test for failed sendbuf allocation Sven Eckelmann
2012-10-17 20:18 ` Simon Wunderlich
2012-10-17 20:16 ` [B.A.T.M.A.N.] [PATCH 1/4] alfred: Prepare makefile for distibutions Simon Wunderlich
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=1350503758-20685-3-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox