summaryrefslogtreecommitdiffstats
path: root/src/tdisksel.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/tdisksel.c
parentf1a17e9f5a52dadbbb825864f514090123021c9b (diff)
Do not declare variable use_sudo if SUDO_BIN is undefined (code style)
Diffstat (limited to 'src/tdisksel.c')
-rw-r--r--src/tdisksel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tdisksel.c b/src/tdisksel.c
index b95e296..14170ad 100644
--- a/src/tdisksel.c
+++ b/src/tdisksel.c
@@ -62,7 +62,9 @@ static int testdisk_disk_selection_ncurses(int verbose,int dump_ind, const list_
unsigned int menu=0;
int offset=0;
int pos_num=0;
+#ifdef SUDO_BIN
int use_sudo=0;
+#endif
const list_disk_t *element_disk;
const list_disk_t *current_disk;
static const struct MenuItem menuMain[]=
@@ -134,6 +136,7 @@ static int testdisk_disk_selection_ncurses(int verbose,int dump_ind, const list_
wmove(stdscr,line,0);
wprintw(stdscr,"detection, and install the latest OS patches and disk drivers.");
}
+#ifdef SUDO_BIN
if(use_sudo > 0)
{
if(i<=NBR_DISK_MAX && element_disk==NULL)
@@ -142,6 +145,7 @@ static int testdisk_disk_selection_ncurses(int verbose,int dump_ind, const list_
options="PNOSQ";
}
else
+#endif
{
if(i<=NBR_DISK_MAX && element_disk==NULL)
options="OQ";