diff options
author | Andreas Schneider <asn@samba.org> | 2012-12-06 15:40:29 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2012-12-12 15:00:02 +0100 |
commit | d55c6e7113efb9214f606dd183e5214a03f6dcae (patch) | |
tree | c3f8858ffbe903c93b0e6f938102dd569b1a0e16 /source3/utils | |
parent | 1dc414e4d22e5d8c77aba2100b6c6c2e3effc00c (diff) | |
download | samba-d55c6e7113efb9214f606dd183e5214a03f6dcae.tar.gz samba-d55c6e7113efb9214f606dd183e5214a03f6dcae.tar.xz samba-d55c6e7113efb9214f606dd183e5214a03f6dcae.zip |
s3-utils: Cleanup code in wait_replies().
Found by Coverity.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbcontrol.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c index f7a93d9d356..ac13dc4e3be 100644 --- a/source3/utils/smbcontrol.c +++ b/source3/utils/smbcontrol.c @@ -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; } |