summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--funcptr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/funcptr.c b/funcptr.c
index 33d4154..dc4aaf3 100644
--- a/funcptr.c
+++ b/funcptr.c
@@ -4,7 +4,7 @@
int doub(int);
int trip(int);
int half(int);
-static int (*fpv[])(int);
+static int (*fpv[4])(int);
void fpv_exec(int (**)(int), int);
int doub(int i) {
@@ -19,7 +19,7 @@ int half(int i) {
return i / 2;
}
-static int (*fpv[])(int) = {doub, trip, half, NULL};
+static int (*fpv[4])(int) = {doub, trip, half, NULL};
void fpv_exec(int (**fpv)(int), int n) {
while (*fpv)