From f065b42dcceb4eb64b26921aaa88d7a67bac3dc0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 16 Jan 2007 20:53:50 +0000 Subject: r20842: Only one more BOOL ok to go... Jeremy. (This used to be commit de0bf477dab1d57b5f7bc6bf70d8e76f9bfac63f) --- source3/smbd/reply.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index f633be3740..c90c59698f 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -4755,7 +4755,6 @@ int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size { int snum; int outsize = 0; - BOOL ok = False; pstring newdir; NTSTATUS status; @@ -4775,17 +4774,12 @@ int reply_setdir(connection_struct *conn, char *inbuf,char *outbuf, int dum_size RESOLVE_DFSPATH(newdir, conn, inbuf, outbuf); - if (strlen(newdir) == 0) { - ok = True; - } else { - ok = vfs_directory_exist(conn,newdir,NULL); - if (ok) - set_conn_connectpath(conn,newdir); - } - - if (!ok) { - END_PROFILE(pathworks_setdir); - return ERROR_DOS(ERRDOS,ERRbadpath); + if (strlen(newdir) != 0) { + if (!vfs_directory_exist(conn,newdir,NULL)) { + END_PROFILE(pathworks_setdir); + return ERROR_DOS(ERRDOS,ERRbadpath); + } + set_conn_connectpath(conn,newdir); } outsize = set_message(outbuf,0,0,False); -- cgit