Skip to content

Commit 81e0d63

Browse files
committed
nad: don't store variables that are never accessed
1 parent 81324a2 commit 81e0d63

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

bin/nad/nad_ls.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,6 @@ static int ad_print(char *path, const struct stat *st, afpvol_t *vol)
526526
static int ad_ls_r(char *path, afpvol_t *vol)
527527
{
528528
int ret = 0, cwd, dirprinted = 0, dirempty;
529-
const char *name;
530529
char *tmp;
531530
static char cwdpath[MAXPATHLEN + 1];
532531
DIR *dp;
@@ -584,7 +583,7 @@ static int ad_ls_r(char *path, afpvol_t *vol)
584583
}
585584

586585
/* Check for netatalk special folders e.g. ".AppleDB" or ".AppleDesktop" */
587-
if ((name = check_netatalk_dirs(ep->d_name)) != NULL) {
586+
if (check_netatalk_dirs(ep->d_name) != NULL) {
588587
continue;
589588
}
590589

@@ -631,7 +630,7 @@ static int ad_ls_r(char *path, afpvol_t *vol)
631630
}
632631

633632
/* Check for netatalk special folders e.g. ".AppleDB" or ".AppleDesktop" */
634-
if ((name = check_netatalk_dirs(ep->d_name)) != NULL) {
633+
if (check_netatalk_dirs(ep->d_name) != NULL) {
635634
continue;
636635
}
637636

bin/nad/nad_mv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int ad_mv(int argc, char *argv[], AFPObj *obj)
189189
return 1;
190190
}
191191

192-
rval = do_move(argv[0], argv[1]);
192+
do_move(argv[0], argv[1]);
193193
closevol(&svolume);
194194
closevol(&dvolume);
195195
return 1;
@@ -351,7 +351,6 @@ static int do_move(const char *from, const char *to)
351351
close(srcfd);
352352

353353
if (errno == EXDEV) {
354-
mustcopy = 1;
355354
char path[MAXPATHLEN];
356355

357356
/*

bin/nad/nad_util.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ char *utompath(const struct vol *vol, const char *upath)
181181
}
182182

183183
/* convert charsets */
184-
if ((size_t) -1 == (outlen = convert_charset(vol->v_volcharset,
185-
CH_UTF8_MAC,
186-
vol->v_maccharset,
187-
u, outlen, mpath, MAXPATHLEN, &flags))) {
184+
if ((size_t) -1 == convert_charset(vol->v_volcharset,
185+
CH_UTF8_MAC,
186+
vol->v_maccharset,
187+
u, outlen, mpath, MAXPATHLEN, &flags)) {
188188
SLOG("Conversion from %s to %s for %s failed.",
189189
vol->v_volcodepage, vol->v_maccodepage, u);
190190
return NULL;

0 commit comments

Comments
 (0)