chiark / gitweb /
Add macro for checking if some flags are set
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 Apr 2018 13:36:20 +0000 (15:36 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit91fc9294277db3702d72083279f20c4a10acff02
tree133e33f3789856c175a9425d02159cc78827cc40
parent370e2cb260e7d8d063e00f6917e76952131ec741
Add macro for checking if some flags are set

This way we don't need to repeat the argument twice.
I didn't replace all instances. I think it's better to leave out:
- asserts
- comparisons like x & y == x, which are mathematically equivalent, but
  here we aren't checking if flags are set, but if the argument fits in the
  flags.
src/basic/capability-util.h
src/basic/copy.c
src/basic/fs-util.c
src/basic/macro.h
src/basic/process-util.c
src/basic/rm-rf.c
src/core/cgroup.c