[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r890 - GNUnet/src/conf
From: |
durner |
Subject: |
[GNUnet-SVN] r890 - GNUnet/src/conf |
Date: |
Thu, 9 Jun 2005 11:56:00 -0700 (PDT) |
Author: durner
Date: 2005-06-09 11:55:49 -0700 (Thu, 09 Jun 2005)
New Revision: 890
Modified:
GNUnet/src/conf/lex.zconf.c
Log:
Don't crash if $LANG isn't set
Modified: GNUnet/src/conf/lex.zconf.c
===================================================================
--- GNUnet/src/conf/lex.zconf.c 2005-06-08 21:06:29 UTC (rev 889)
+++ GNUnet/src/conf/lex.zconf.c 2005-06-09 18:55:49 UTC (rev 890)
@@ -3591,10 +3591,12 @@
*/
FILE *zconf_fopen(const char *name)
{
+ char *env;
char configFile[PATH_MAX+1], lang[3];
FILE *f;
- strlcpy(lang, getenv("LANG"), 3);
+ env = getenv("LANG");
+ strlcpy(lang, env ? env : "", 3);
snprintf(configFile, PATH_MAX + 1, "%s.%s", name, lang);
if (!(f = FOPEN(configFile, "r")))
f = FOPEN(name, "r");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r890 - GNUnet/src/conf,
durner <=