From 852f8af0a35b068c320219131b8dd9bdfecbfd57 Mon Sep 17 00:00:00 2001 From: Nikita Ivanov Date: Sun, 12 Jun 2022 15:24:42 +0500 Subject: [PATCH] Minor --- src/config.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/config.c b/src/config.c index 6329bdc..3b4af40 100644 --- a/src/config.c +++ b/src/config.c @@ -6,13 +6,12 @@ #define CHECK(f, cond) \ do { \ int x = (f); \ - if (cond) \ + if (!(cond)) \ return x; \ } while (0) -#define CHECK_OK(f) CHECK(f, x != STAT_OK) -#define CHECK_NULL(f) CHECK(f, x != STAT_NULL) -#define CHECK_OK_NULL(f) CHECK(f, x != STAT_OK || x != STAT_NULL) +#define CHECK_OK(f) CHECK(f, x == STAT_OK) +#define CHECK_NULL(f) CHECK(f, x == STAT_NULL) #define EXPECT(x) CHECK_OK(expect(x)) #define ACCEPT(x) CHECK_OK(accept(x))