diff options
Diffstat (limited to 'coreutils/mv.c')
-rw-r--r-- | coreutils/mv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/mv.c b/coreutils/mv.c index eae2e99bb..fd2422683 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c | |||
@@ -108,7 +108,7 @@ int mv_main(int argc, char **argv) | |||
108 | /* else: fall through into "do { move SRC to DIR/SRC } while" loop */ | 108 | /* else: fall through into "do { move SRC to DIR/SRC } while" loop */ |
109 | } | 109 | } |
110 | } | 110 | } |
111 | /* else: last is DIR from "t -DIR" */ | 111 | /* else: last is DIR from "-t DIR" */ |
112 | 112 | ||
113 | do { | 113 | do { |
114 | dest = concat_path_file(last, bb_get_last_path_component_strip(*argv)); | 114 | dest = concat_path_file(last, bb_get_last_path_component_strip(*argv)); |
@@ -185,7 +185,7 @@ int mv_main(int argc, char **argv) | |||
185 | if (dest != last) { | 185 | if (dest != last) { |
186 | free((void *) dest); | 186 | free((void *) dest); |
187 | } | 187 | } |
188 | } while (*++argv != last); | 188 | } while (*++argv && *argv != last); |
189 | 189 | ||
190 | return status; | 190 | return status; |
191 | } | 191 | } |