[Pkg-wmaker-commits] [wmtime] 77/101: wmtime: Fix "ordered comparison of pointer with integer zero" warning.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:59:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmtime.
commit 2c2ec156a518e2f3437a055d26b71ad23304648f
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Mon May 25 17:21:30 2015 -0500
wmtime: Fix "ordered comparison of pointer with integer zero" warning.
Also take the opportunity to add an error message when iconv_open fails.
---
wmtime.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/wmtime.c b/wmtime.c
index 562907f..c925c68 100644
--- a/wmtime.c
+++ b/wmtime.c
@@ -189,8 +189,10 @@ void get_lang(void)
size_t insize, outsize;
icd = iconv_open("ASCII//TRANSLIT", nl_langinfo(CODESET));
- if (icd < 0)
+ if (icd == (iconv_t) -1) {
+ perror("wmtime: Error allocating charset conversion descriptor");
return;
+ }
for (i = 0; i < 7; i++) {
strncpy(langbuf, nl_langinfo(ABDAY_1 + i), 10);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmtime.git
More information about the Pkg-wmaker-commits
mailing list