[git commit] taskset: fix logic error in "if it doesn't start with 0x..."
Denys Vlasenko
vda.linux at googlemail.com
Sat Aug 30 23:35:45 UTC 2014
commit: http://git.busybox.net/busybox/commit/?id=f02c52bcdecc2f2859655e42f15365c0449b6ce3
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
miscutils/taskset.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/miscutils/taskset.c b/miscutils/taskset.c
index 8bd32ed..2646e1d 100644
--- a/miscutils/taskset.c
+++ b/miscutils/taskset.c
@@ -176,7 +176,7 @@ int taskset_main(int argc UNUSED_PARAM, char **argv)
/* Cheap way to get "long enough" buffer */
bin = xstrdup(aff);
- if (aff[0] != '0' && (aff[1]|0x20) != 'x') {
+ if (aff[0] != '0' || (aff[1]|0x20) != 'x') {
/* TODO: decimal/octal masks are still limited to 2^64 */
unsigned long long m = xstrtoull_range(aff, 0, 1, ULLONG_MAX);
bin += strlen(bin);
More information about the busybox-cvs
mailing list