From 283e091c18f4c6d1be804f569245bd4ad17dcf45 Mon Sep 17 00:00:00 2001 From: Benjamin Moir Date: Tue, 1 Sep 2015 00:21:36 +0930 Subject: [PATCH] :^) --- src/lt.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lt.c b/src/lt.c index b26c206..4df83d6 100644 --- a/src/lt.c +++ b/src/lt.c @@ -488,12 +488,8 @@ LT_BOOL LT_OpenFile(__str filePath) parseMode = LT_PARSE_FILE; parseFile = fopen(filePath, "r"); - if(parseFile == NULL) - { - LT_Assert(LT_TRUE, "LT_OpenFile: %s", strerror(errno)); + if (LT_Assert(parseFile == NULL, "LT_OpenFile: %s", strerror(errno))); return LT_FALSE; - } - return LT_TRUE; } @@ -503,12 +499,8 @@ LT_BOOL LT_OpenString(const char *str) parseStr = str; parseStrPos = 0; - if (parseStr == NULL) - { - LT_Assert(LT_TRUE, "LT_OpenString: %s", strerror(errno)); + if (LT_Assert(parseStr == NULL, "LT_OpenString: %s", strerror(errno))) return LT_FALSE; - } - return LT_TRUE; }