From d7be70d92a27ca94483811b41c0d15bb761268c3 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 30 Mar 2024 02:16:32 +0100 Subject: Do the assignment in the if --- FICS/eco.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'FICS/eco.c') diff --git a/FICS/eco.c b/FICS/eco.c index c25d54c..1cae520 100644 --- a/FICS/eco.c +++ b/FICS/eco.c @@ -269,8 +269,7 @@ LONG_init(void) continue; sscanf(ptmp, "%[^*\n]", LONG); - LONG_book[i] = malloc(sizeof(LONG_entry)); - if (LONG_book[i] == NULL) { + if ((LONG_book[i] = malloc(sizeof(LONG_entry))) == NULL) { fprintf(stderr, "Cound not alloc mem for " "LONG entry %d.\n", i); exit(1); -- cgit v1.2.3