s3:lib/addrchange: set ctx->sock to -1 after close
authorStefan Metzmacher <metze@samba.org>
Fri, 4 Feb 2011 11:54:36 +0000 (12:54 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 7 Feb 2011 09:46:53 +0000 (02:46 -0700)
The makes the code more consistent with similar destructors.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Feb  4 15:52:55 CET 2011 on sn-devel-104

source3/lib/addrchange.c

index 293ebc459e0bfc347090adc9622a7b638e88dc9c..881ef95762f23f21f6d8b4d37d62404ae051fe6a 100644 (file)
@@ -75,7 +75,7 @@ static int addrchange_context_destructor(struct addrchange_context *c)
 {
        if (c->sock != -1) {
                close(c->sock);
-               c->sock = 0;
+               c->sock = -1;
        }
        return 0;
 }