diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2000-08-30 11:44:44 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2000-08-30 11:44:44 +0000 |
commit | b9b68e50dc5c84ad3c392a4497b1ac5c4d0978cb (patch) | |
tree | cec4e7ee49f7f35f3b960338c4e0b601d2dc0251 /lib/libc/nls | |
parent | 5e52038c0e7beb2e33582a4f020854659e4c1bc6 (diff) | |
download | src-test2-b9b68e50dc5c84ad3c392a4497b1ac5c4d0978cb.tar.gz src-test2-b9b68e50dc5c84ad3c392a4497b1ac5c4d0978cb.zip |
Notes
Diffstat (limited to 'lib/libc/nls')
-rw-r--r-- | lib/libc/nls/msgcat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index ee97058b4690..cb61b140142b 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -194,7 +194,7 @@ int setId; MCSetT *set; long lo, hi, cur, dir; - if (!cat || setId <= 0) return(NULL); + if (cat == NULL || setId <= 0) return(NULL); lo = 0; if (setId - 1 < cat->numSets) { @@ -220,8 +220,8 @@ int setId; if (hi - lo == 1) cur += dir; else cur += ((hi - lo) / 2) * dir; } - if (set->invalid) - (void) loadSet(cat, set); + if (set->invalid && loadSet(cat, set) <= 0) + return(NULL); return(set); } @@ -233,7 +233,7 @@ int msgId; MCMsgT *msg; long lo, hi, cur, dir; - if (!set || set->invalid || msgId <= 0) return(NULL); + if (set == NULL || set->invalid || msgId <= 0) return(NULL); lo = 0; if (msgId - 1 < set->numMsgs) { @@ -326,7 +326,7 @@ __const char *catpath; off_t nextSet; cat = (MCCatT *) malloc(sizeof(MCCatT)); - if (!cat) return(NLERR); + if (cat == NULL) return(NLERR); cat->loadType = MCLoadBySet; if ((cat->fd = _open(catpath, O_RDONLY)) < 0) { @@ -359,7 +359,7 @@ __const char *catpath; cat->numSets = header.numSets; cat->sets = (MCSetT *) malloc(sizeof(MCSetT) * header.numSets); - if (!cat->sets) NOSPACE(); + if (cat->sets == NULL) NOSPACE(); nextSet = header.firstSet; for (i = 0; i < cat->numSets; ++i) { |