summaryrefslogtreecommitdiff
path: root/src/defaultfont.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-26 01:34:13 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2010-08-26 01:34:13 +0000
commit369e95c1df681537492ac4132fcc439a66dd7884 (patch)
tree3058d0f0bc0b6e2bfc578ce0120748c1f441c8b6 /src/defaultfont.c
parentd3bb74d0299714ee4e410e52b7a14bd22d0b22c6 (diff)
downloadeterm-369e95c1df681537492ac4132fcc439a66dd7884.tar.gz
Revert and re-apply badnull patch
Revert previous patch generated by badnull.cocci script, and apply the new one. The main difference is that assert and assert-like functions are not touched anymore. SVN revision: 51650
Diffstat (limited to 'src/defaultfont.c')
-rw-r--r--src/defaultfont.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/defaultfont.c b/src/defaultfont.c
index 6200d89..2c45f19 100644
--- a/src/defaultfont.c
+++ b/src/defaultfont.c
@@ -178,10 +178,10 @@ eterm_default_font_locale(char ***fonts, char ***mfonts, char **mencoding, int *
int j, k;
locale = setlocale(LC_CTYPE, "");
- if (locale == NULL)
- if ((locale = getenv("LC_ALL")) == NULL)
- if ((locale = getenv("LC_CTYPE")) == NULL)
- if ((locale = getenv("LANG")) == NULL)
+ if (!locale)
+ if (!(locale = getenv("LC_ALL")))
+ if (!(locale = getenv("LC_CTYPE")))
+ if (!(locale = getenv("LANG")))
locale = "C"; /* failsafe */
/* Obtain a "normalized" name of current encoding.