aboutsummaryrefslogtreecommitdiff
path: root/tests/uns_test.c
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2021-06-21 17:46:43 -0700
committerAndrew G. Morgan <morgan@kernel.org>2021-06-21 17:46:43 -0700
commit06ec53d0c9fcddcc071a0e07731e6c83238400e6 (patch)
tree3b72224cb78968adfbb15ab98a62b0960571e60c /tests/uns_test.c
parent3857d17677ab60c35d12c003eee219c6f51da566 (diff)
downloadlibcap-06ec53d0c9fcddcc071a0e07731e6c83238400e6.tar.gz
Permit compilation with -std=c89.
Tested with make COPTS="-O2 -std=c89" clean all test sudotest This addresses the issue reported by Byron Stanoszek: https://bugzilla.kernel.org/show_bug.cgi?id=213541 Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Diffstat (limited to 'tests/uns_test.c')
-rw-r--r--tests/uns_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/uns_test.c b/tests/uns_test.c
index 41aa0a6..d8f5415 100644
--- a/tests/uns_test.c
+++ b/tests/uns_test.c
@@ -115,7 +115,8 @@ int main(int argc, char **argv)
}
close(fds.from[0]);
- for (int i=0; i<2; i++) {
+ int i;
+ for (i=0; i<2; i++) {
char *map_file;
if (asprintf(&map_file, file_formats[i], pid) < 0) {
perror("allocate string");