From bef944166ab5b5e6dcceaeb4655b20bd7f2fc4d2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 11 Jan 2013 10:31:42 +0100 Subject: samr: Split up an assignment from an if condition Reviewed by: Jeremy Allison --- source3/rpc_server/samr/srv_samr_chgpasswd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/rpc_server/samr/srv_samr_chgpasswd.c b/source3/rpc_server/samr/srv_samr_chgpasswd.c index 51c0d0f96a..3d04899a53 100644 --- a/source3/rpc_server/samr/srv_samr_chgpasswd.c +++ b/source3/rpc_server/samr/srv_samr_chgpasswd.c @@ -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); -- cgit