From ec0237b1386c7c16d19bf33e486bf3be71b4fb15 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 10 Dec 2019 15:33:56 +1300 Subject: Remove some unneeded brackets --- funcptrptr.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'funcptrptr.c') diff --git a/funcptrptr.c b/funcptrptr.c index 810764e..17864a0 100644 --- a/funcptrptr.c +++ b/funcptrptr.c @@ -22,23 +22,20 @@ int half(int i) { void fpv_exec(int (**fpv)(int), int n) { int i; - for (i = 0; *(fpv + i) != NULL; i++) { + for (i = 0; *(fpv + i) != NULL; i++) printf("%d\n", (*(fpv + i))(n)); - } } void fpvv_exec(int (***fpvv)(int), int n) { int i; - for (i = 0; *(fpvv + i) != NULL; i++) { + for (i = 0; *(fpvv + i) != NULL; i++) fpv_exec(*(fpvv + i), n); - } } void fpvvv_exec(int (****fpvvv)(int), int n) { int i; - for (i = 0; *(fpvvv + i) != NULL; i++) { + for (i = 0; *(fpvvv + i) != NULL; i++) fpvv_exec(*(fpvvv + i), n); - } } int main(int argc, char **argv) { @@ -70,9 +67,8 @@ int main(int argc, char **argv) { fpvvv[1][1][2] = half; fpvvv[1][1][3] = NULL; - for (argv++, argc--; argc; argv++, argc--) { + for (argv++, argc--; argc; argv++, argc--) fpvvv_exec(fpvvv, atoi(*argv)); - } exit(EXIT_SUCCESS); } -- cgit v1.2.3