From: Michael Adam Date: Tue, 24 Jun 2008 10:46:13 +0000 (+0200) Subject: nmbd: untangle logic in nmbd_messaging_context() slightly. X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=7ec1678d6015ff7a5e262dc95bb6190748f1daff;p=metze%2Fsamba%2Fwip.git nmbd: untangle logic in nmbd_messaging_context() slightly. Michael (This used to be commit 3baf9eb6a2cc6a4a153303b457d3a7067948495e) --- diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 5126715a47f7..46c3f1dd3c90 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/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;