]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
delta: check if a prefix needs to be skipped only once
authorFranck Bui <fbui@suse.com>
Mon, 4 Dec 2017 10:36:17 +0000 (11:36 +0100)
committerFranck Bui <fbui@suse.com>
Mon, 4 Dec 2017 11:40:46 +0000 (12:40 +0100)
The condition is already tested later by process_fix() therefore there's no
need the check in process_suffix_chop() since it will end up calling
process_fix() anyways.

src/delta/delta.c

index d28688169855ce3260df39229c2d4d5c2b3c9fba..f626537438a261c9f85019397ea76943a15c5d6a 100644 (file)
@@ -520,13 +520,6 @@ static int process_suffix_chop(const char *arg) {
         /* Strip prefix from the suffix */
         NULSTR_FOREACH(p, prefixes) {
                 const char *suffix;
-                int skip;
-
-                skip = should_skip_prefix(p);
-                if (skip < 0)
-                        return skip;
-                if (skip)
-                        continue;
 
                 suffix = startswith(arg, p);
                 if (suffix) {