Skip to content

Commit

Permalink
apparently they made "nullptr" a keyword in C23
Browse files Browse the repository at this point in the history
use null_ptr instead
  • Loading branch information
turistu committed Jan 26, 2025
1 parent 38239e8 commit fd6e3dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/affinity.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ get_cpuset_size(void)
* to dodge the _Nonnull pointer attribute from
* sched_getaffinity()'s declaration
*/
cpu_set_t *nullptr = NULL;
cpu_set_t *null_ptr = NULL;
while (cpuset_size &&
sched_getaffinity(0, cpuset_size, nullptr) == -1 &&
sched_getaffinity(0, cpuset_size, null_ptr) == -1 &&
EINVAL == errno) {
cpuset_size <<= 1;
}
Expand Down

0 comments on commit fd6e3dd

Please sign in to comment.