projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When doing an if-test on the result of a function which returns a string
[mmh]
/
uip
/
termsbr.c
diff --git
a/uip/termsbr.c
b/uip/termsbr.c
index
421c367
..
a1b8ebf
100644
(file)
--- a/
uip/termsbr.c
+++ b/
uip/termsbr.c
@@
-105,10
+105,10
@@
read_termcap(void)
* If possible, we let tgetent allocate its own termcap buffer
*/
#ifdef TGETENT_ACCEPTS_NULL
* If possible, we let tgetent allocate its own termcap buffer
*/
#ifdef TGETENT_ACCEPTS_NULL
- if (tgetent (NULL, term) <= 0)
- return
+ if (tgetent (NULL, term) != TGETENT_SUCCESS)
+ return;
#else
#else
- if (tgetent (termbuf, term) <= 0)
+ if (tgetent (termbuf, term) != TGETENT_SUCCESS)
return;
#endif
return;
#endif