4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

Cygwin: getconf: align -a output to glibc getconf

glibc getconf doesn't print "undefined" for undefined values
in -a output.  It just prints the empty string.  Do it the
same way.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2022-03-02 22:15:02 +01:00
parent fcec4830ab
commit 35ba7d147d

View File

@ -481,7 +481,7 @@ printvar (const struct conf_variable *cp, const char *pathname)
{
if (a_flag && errno != 0)
return; /* Just skip invalid variables */
print_strvar (cp->name, "undefined");
print_strvar (cp->name, a_flag ? "" : "undefined");
}
else
print_longvar (cp->name, val);
@ -493,7 +493,7 @@ printvar (const struct conf_variable *cp, const char *pathname)
{
if (a_flag && errno != 0)
return; /* Just skip invalid variables */
print_strvar (cp->name, "undefined");
print_strvar (cp->name, a_flag ? "" : "undefined");
}
else
print_longvar (cp->name, val);