summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/sudo/def_data.h2
-rw-r--r--usr.bin/sudo/mkdefaults5
2 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/sudo/def_data.h b/usr.bin/sudo/def_data.h
index 40cdb8fc76e..5887d527289 100644
--- a/usr.bin/sudo/def_data.h
+++ b/usr.bin/sudo/def_data.h
@@ -120,5 +120,5 @@ enum def_tupple {
once,
always,
any,
- all,
+ all
};
diff --git a/usr.bin/sudo/mkdefaults b/usr.bin/sudo/mkdefaults
index 856890050c9..f125e045258 100644
--- a/usr.bin/sudo/mkdefaults
+++ b/usr.bin/sudo/mkdefaults
@@ -109,8 +109,9 @@ print CFILE "\tNULL, 0, NULL\n }\n};\n";
# Print out def_tuple
if (@tuple_values) {
print HEADER "\nenum def_tupple {\n";
- foreach (@tuple_values) {
- print HEADER "\t$_,\n";
+ for ($i = 0; $i <= $#tuple_values; $i++) {
+ printf HEADER "\t%s%s\n", $tuple_values[$i],
+ $i != $#tuple_values ? "," : "";
}
print HEADER "};\n";
}