From 47d58cbea523862d6b39429118c102c5d81283e7 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 25 Dec 2020 10:29:46 +0100 Subject: Cleanup: Simplify by removing comparison Signed-off-by: Matthias Beyer --- cras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cras.c b/cras.c index d58fded..9ce8874 100644 --- a/cras.c +++ b/cras.c @@ -147,7 +147,7 @@ write_crasfile(const char *crasfile, TaskLst list) { FILE *fp; - if ((fp = fopen(crasfile, "w")) == NULL) { + if (!(fp = fopen(crasfile, "w"))) { task_lst_cleanup(&list); die("Could not write to %s: %s", crasfile, strerror(errno)); } -- cgit v1.2.3