summaryrefslogtreecommitdiff
path: root/source3/utils/smbcontrol.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-09-26 14:47:20 +0200
committerJeremy Allison <jra@samba.org>2018-10-20 02:17:56 +0200
commitd15a00babf3e2940a03fd9a70c1c54951f4f8660 (patch)
tree29833dc86b79210f9fe3f0d7bbc321d3d97d29fc /source3/utils/smbcontrol.c
parent1ca21b98231d8ea9473f7cb8838cdb21f4663657 (diff)
downloadsamba-d15a00babf3e2940a03fd9a70c1c54951f4f8660.tar.gz
s3:smbcontrol: Simplify the return code check
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Oct 20 02:17:56 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3/utils/smbcontrol.c')
-rw-r--r--source3/utils/smbcontrol.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index e23e1284012..597bab6450d 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -1142,14 +1142,13 @@ static bool do_winbind_offline(struct tevent_context *ev_ctx,
/* Check that the entry "WINBINDD_OFFLINE" still exists. */
d = tdb_fetch_bystring( tdb, "WINBINDD_OFFLINE" );
-
- if (!d.dptr || d.dsize != 4) {
- SAFE_FREE(d.dptr);
- DEBUG(10,("do_winbind_offline: offline state not set - retrying.\n"));
- } else {
+ if (d.dptr != NULL && d.dsize == 4) {
SAFE_FREE(d.dptr);
break;
}
+
+ SAFE_FREE(d.dptr);
+ DEBUG(10,("do_winbind_offline: offline state not set - retrying.\n"));
}
tdb_close(tdb);