summaryrefslogtreecommitdiffstats
path: root/share/man/man3/stdarg.3
diff options
context:
space:
mode:
Diffstat (limited to 'share/man/man3/stdarg.3')
-rw-r--r--share/man/man3/stdarg.33
1 files changed, 2 insertions, 1 deletions
diff --git a/share/man/man3/stdarg.3 b/share/man/man3/stdarg.3
index 3b9a820..16876a1 100644
--- a/share/man/man3/stdarg.3
+++ b/share/man/man3/stdarg.3
@@ -163,7 +163,8 @@ void foo(char *fmt, ...)
printf("int %d\en", d);
break;
case 'c': /* char */
- c = va_arg(ap, char);
+ /* Note: char is promoted to int. */
+ c = va_arg(ap, int);
printf("char %c\en", c);
break;
}
OpenPOWER on IntegriCloud