From: Michael Adam Date: Tue, 24 Jun 2008 10:46:13 +0000 (+0200) Subject: nmbd: untangle logic in nmbd_messaging_context() slightly. X-Git-Tag: samba-3.3.0pre1~754 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3baf9eb6a2cc6a4a153303b457d3a7067948495e;p=thirdparty%2Fsamba.git nmbd: untangle logic in nmbd_messaging_context() slightly. Michael --- diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 5126715a47f..46c3f1dd3c9 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -52,8 +52,11 @@ struct messaging_context *nmbd_messaging_context(void) { static struct messaging_context *ctx; - if (!ctx && !(ctx = messaging_init(NULL, server_id_self(), - nmbd_event_context()))) { + if (ctx == NULL) { + ctx = messaging_init(NULL, server_id_self(), + nmbd_event_context()); + } + if (ctx == NULL) { DEBUG(0, ("Could not init nmbd messaging context.\n")); } return ctx;