summaryrefslogtreecommitdiff
path: root/src/catalog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/catalog.c')
-rw-r--r--src/catalog.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/catalog.c b/src/catalog.c
index 6c3bdad..03c400d 100644
--- a/src/catalog.c
+++ b/src/catalog.c
@@ -37,7 +37,7 @@ i18n_init(void) {
}
catalog_descriptor = catopen(CATALOG_NAME, 0);
- if (catalog_descriptor && catalog_descriptor == (nl_catd)-1) {
+ if (catalog_descriptor != NULL && catalog_descriptor == (nl_catd)-1) {
logerr("catopen(\"%s\", 0): %s\n", CATALOG_NAME, strerror(errno));
catalog_descriptor = NULL;
goto out;
@@ -52,7 +52,7 @@ int
i18n_destroy(void) {
int rc = -1;
- if (catalog_descriptor) {
+ if (catalog_descriptor != NULL) {
if (catclose(catalog_descriptor)) {
logerr("catclose(...): %s\n", strerror(errno));
goto out;
@@ -61,7 +61,7 @@ i18n_destroy(void) {
rc = 0;
out:
- if (catalog_descriptor) {
+ if (catalog_descriptor != NULL) {
catalog_descriptor = NULL;
}
return rc;
@@ -75,7 +75,7 @@ s(const char* const MSGS[], const int msg_id) {
assert(msg_id > 0);
// FIXME: assert within bounds!
// printf("sizeof(MSGS): %ld\n", sizeof(MSGS));
- if (!catalog_descriptor) {
+ if (catalog_descriptor == NULL) {
return MSGS[msg_id];
}