logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: c9e9194dd4ed1796f28c594bf27f75fbe7d1e9ea
parent 5d7fc0ed50c184dc6a9ced8e9d36cc931b5eb5ac
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 14 Apr 2025 01:55:41 +0200

cmd/getconf: use the correct structs in -a loops

Diffstat:

Mcmd/getconf.c8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cmd/getconf.c b/cmd/getconf.c @@ -174,7 +174,7 @@ main(int argc, char *argv[]) strerror(errno)); return 1; } - if(ret == -1) ret = sysconf_vars[i].limit_h; + if(ret == -1) ret = pathconf_vars[i].limit_h; printf("%ld\n", ret); return 0; @@ -264,8 +264,8 @@ main(int argc, char *argv[]) { fprintf(stderr, "getconf: error: sysconf(%d /* \"%s\" */): %s\n", - confstr_vars[i].value, - confstr_vars[i].name, + sysconf_vars[i].value, + sysconf_vars[i].name, strerror(errno)); err = 1; continue; @@ -311,7 +311,7 @@ main(int argc, char *argv[]) err = 1; continue; } - if(ret == -1) ret = sysconf_vars[i].limit_h; + if(ret == -1) ret = pathconf_vars[i].limit_h; printf("%s: %ld\n", pathconf_vars[i].name, ret); }