s3-utils: Cleanup code in wait_replies().
authorAndreas Schneider <asn@samba.org>
Thu, 6 Dec 2012 14:40:29 +0000 (15:40 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 12 Dec 2012 14:00:02 +0000 (15:00 +0100)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/utils/smbcontrol.c

index f7a93d9d3566029523a5956b36b151a3d6908557..ac13dc4e3be1cdc3a7f3388266c6e39ca6d12b92 100644 (file)
@@ -93,9 +93,10 @@ static void wait_replies(struct tevent_context *ev_ctx,
        struct tevent_timer *te;
        bool timed_out = False;
 
-       if (!(te = tevent_add_timer(ev_ctx, NULL,
-                                   timeval_current_ofs(timeout, 0),
-                                   smbcontrol_timeout, (void *)&timed_out))) {
+       te = tevent_add_timer(ev_ctx, NULL,
+                             timeval_current_ofs(timeout, 0),
+                             smbcontrol_timeout, (void *)&timed_out);
+       if (te == NULL) {
                DEBUG(0, ("tevent_add_timer failed\n"));
                return;
        }