diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-08-31 01:35:45 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-08-31 01:35:45 +0200 |
commit | f02c52bcdecc2f2859655e42f15365c0449b6ce3 (patch) | |
tree | 01b82c4b168dfe205700be0e8e9f3df1b2f2d549 | |
parent | 34cc6c91a286411a8275d9d61aa80397fe1e5fa3 (diff) | |
download | busybox-w32-f02c52bcdecc2f2859655e42f15365c0449b6ce3.tar.gz busybox-w32-f02c52bcdecc2f2859655e42f15365c0449b6ce3.tar.bz2 busybox-w32-f02c52bcdecc2f2859655e42f15365c0449b6ce3.zip |
taskset: fix logic error in "if it doesn't start with 0x..."
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/taskset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 8bd32ed61..2646e1dab 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c | |||
@@ -176,7 +176,7 @@ int taskset_main(int argc UNUSED_PARAM, char **argv) | |||
176 | /* Cheap way to get "long enough" buffer */ | 176 | /* Cheap way to get "long enough" buffer */ |
177 | bin = xstrdup(aff); | 177 | bin = xstrdup(aff); |
178 | 178 | ||
179 | if (aff[0] != '0' && (aff[1]|0x20) != 'x') { | 179 | if (aff[0] != '0' || (aff[1]|0x20) != 'x') { |
180 | /* TODO: decimal/octal masks are still limited to 2^64 */ | 180 | /* TODO: decimal/octal masks are still limited to 2^64 */ |
181 | unsigned long long m = xstrtoull_range(aff, 0, 1, ULLONG_MAX); | 181 | unsigned long long m = xstrtoull_range(aff, 0, 1, ULLONG_MAX); |
182 | bin += strlen(bin); | 182 | bin += strlen(bin); |