summaryrefslogtreecommitdiffstats
path: root/src/phmain.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-06-10 10:15:01 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-06-10 10:15:01 +0200
commitfc8fb6b6b4a92c5f6f617ca185daa109deb4f469 (patch)
treedf976324e3eb0185dd25aa08b9da3c8d09d25678 /src/phmain.c
parentf1a17e9f5a52dadbbb825864f514090123021c9b (diff)
Do not declare variable use_sudo if SUDO_BIN is undefined (code style)
Diffstat (limited to 'src/phmain.c')
-rw-r--r--src/phmain.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/phmain.c b/src/phmain.c
index 3bc72cf..a634490 100644
--- a/src/phmain.c
+++ b/src/phmain.c
@@ -125,7 +125,9 @@ static void display_version(void)
int main( int argc, char **argv )
{
int i;
+#ifdef SUDO_BIN
int use_sudo=0;
+#endif
int create_log=TD_LOG_NONE;
int run_setlocale=1;
int testdisk_mode=TESTDISK_O_RDONLY|TESTDISK_O_READAHEAD_32K;
@@ -359,9 +361,11 @@ int main( int argc, char **argv )
#endif
#endif
}
-#endif
if(use_sudo==0)
use_sudo=do_curses_photorec(&params, &options, list_disk);
+#else
+ do_curses_photorec(&params, &options, list_disk);
+#endif
#ifdef HAVE_NCURSES
end_ncurses();
#endif