mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 12:28:58 +00:00
Don't assign the va_list variable 'ap' directly to the argtable because
va_list is not a pointer on alpha. Instead, use the va_arg() macro to return the address that is stored in the argtable.
This commit is contained in:
parent
0888581f49
commit
77af5d1ac8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35835
@ -39,7 +39,7 @@
|
||||
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
|
||||
#endif
|
||||
static const char rcsid[] =
|
||||
"$Id: vfprintf.c,v 1.17 1998/01/04 22:28:47 ache Exp $";
|
||||
"$Id: vfprintf.c,v 1.18 1998/04/11 07:40:47 jb Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
@ -1105,58 +1105,57 @@ done:
|
||||
|
||||
(*argtable) [0] = NULL;
|
||||
for (n = 1; n <= tablemax; n++) {
|
||||
(*argtable) [n] = ap;
|
||||
switch (typetable [n]) {
|
||||
case T_UNUSED:
|
||||
(void) va_arg (ap, int);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, int);
|
||||
break;
|
||||
case T_SHORT:
|
||||
(void) va_arg (ap, int);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, int);
|
||||
break;
|
||||
case T_U_SHORT:
|
||||
(void) va_arg (ap, int);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, int);
|
||||
break;
|
||||
case TP_SHORT:
|
||||
(void) va_arg (ap, short *);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, short *);
|
||||
break;
|
||||
case T_INT:
|
||||
(void) va_arg (ap, int);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, int);
|
||||
break;
|
||||
case T_U_INT:
|
||||
(void) va_arg (ap, unsigned int);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, unsigned int);
|
||||
break;
|
||||
case TP_INT:
|
||||
(void) va_arg (ap, int *);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, int *);
|
||||
break;
|
||||
case T_LONG:
|
||||
(void) va_arg (ap, long);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, long);
|
||||
break;
|
||||
case T_U_LONG:
|
||||
(void) va_arg (ap, unsigned long);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, unsigned long);
|
||||
break;
|
||||
case TP_LONG:
|
||||
(void) va_arg (ap, long *);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, long *);
|
||||
break;
|
||||
case T_QUAD:
|
||||
(void) va_arg (ap, quad_t);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, quad_t);
|
||||
break;
|
||||
case T_U_QUAD:
|
||||
(void) va_arg (ap, u_quad_t);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, u_quad_t);
|
||||
break;
|
||||
case TP_QUAD:
|
||||
(void) va_arg (ap, quad_t *);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, quad_t *);
|
||||
break;
|
||||
case T_DOUBLE:
|
||||
(void) va_arg (ap, double);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, double);
|
||||
break;
|
||||
case T_LONG_DOUBLE:
|
||||
(void) va_arg (ap, long double);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, long double);
|
||||
break;
|
||||
case TP_CHAR:
|
||||
(void) va_arg (ap, char *);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, char *);
|
||||
break;
|
||||
case TP_VOID:
|
||||
(void) va_arg (ap, void *);
|
||||
(*argtable) [n] = (void *) &va_arg (ap, void *);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user