samr: Split up an assignment from an if condition
authorVolker Lendecke <vl@samba.org>
Fri, 11 Jan 2013 09:31:42 +0000 (10:31 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 14 Jan 2013 17:01:26 +0000 (09:01 -0800)
Reviewed by: Jeremy Allison <jra@samba.org>

source3/rpc_server/samr/srv_samr_chgpasswd.c

index 51c0d0f96a701be1aedc930159e6ab08cddd9791..3d04899a53473ece7819f2d22afc8bc6b5707377 100644 (file)
@@ -74,7 +74,8 @@ static int findpty(char **slave)
 
 #if defined(HAVE_GRANTPT)
        /* Try to open /dev/ptmx. If that fails, fall through to old method. */
-       if ((master = open("/dev/ptmx", O_RDWR, 0)) >= 0) {
+       master = open("/dev/ptmx", O_RDWR, 0);
+       if (master >= 0) {
                grantpt(master);
                unlockpt(master);
                line = (char *)ptsname(master);