parse_env_file() - return empty value strings like FOO="" as NULL value
This commit is contained in:
@@ -653,6 +653,12 @@ int parse_env_file(
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (v[0] == '\0') {
|
||||
/* return empty value strings as NULL */
|
||||
free(v);
|
||||
v = NULL;
|
||||
}
|
||||
|
||||
free(*value);
|
||||
*value = v;
|
||||
|
||||
|
||||
@@ -113,11 +113,11 @@ static int load_font(const char *vc, const char *font, const char *map, const ch
|
||||
args[i++] = "-C";
|
||||
args[i++] = vc;
|
||||
args[i++] = font;
|
||||
if (map && map[0] != '\0') {
|
||||
if (map) {
|
||||
args[i++] = "-m";
|
||||
args[i++] = map;
|
||||
}
|
||||
if (unimap && unimap[0] != '\0') {
|
||||
if (unimap) {
|
||||
args[i++] = "-u";
|
||||
args[i++] = unimap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user