← Commit list

f02c52bcd

Denys Vlasenko
Denys Vlasenko
2014-08-31
SUCCESS Duration: 149s

Subject

taskset: fix logic error in "if it doesn't start with 0x..."

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/taskset.c+1 -1
@@ -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);