From 7ec1678d6015ff7a5e262dc95bb6190748f1daff Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 24 Jun 2008 12:46:13 +0200 Subject: nmbd: untangle logic in nmbd_messaging_context() slightly. Michael (This used to be commit 3baf9eb6a2cc6a4a153303b457d3a7067948495e) --- source3/nmbd/nmbd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/nmbd/nmbd.c') diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 5126715a47..46c3f1dd3c 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; -- cgit