mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
cpumf/chcpumf: Simplify comparison against 0
Simplify comparison against 0 or NULL and fix a checkpatch.pl warning. Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
4fb18a1e7b
commit
44de579311
@@ -96,7 +96,7 @@ static int read_sfb(unsigned long *min, unsigned long *max)
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
fp = fopen(PERF_SFB_SIZE, "r");
|
||||
if (fp == NULL) {
|
||||
if (!fp) {
|
||||
linux_error(PERF_SFB_SIZE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ static int write_sfb(unsigned long min, unsigned long max)
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen(PERF_SFB_SIZE, "w");
|
||||
if (fp == NULL) {
|
||||
if (!fp) {
|
||||
linux_error(PERF_SFB_SIZE);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@@ -204,7 +204,7 @@ int main(int argc, char **argv)
|
||||
util_opt_init(opt_vec, NULL);
|
||||
|
||||
parse_args(argc, argv);
|
||||
if (stat(PERF_PATH PERF_SF, &sbuf) != 0) {
|
||||
if (stat(PERF_PATH PERF_SF, &sbuf)) {
|
||||
fprintf(stderr,
|
||||
"No CPU-measurement sampling facility detected\n");
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user