mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-20 23:54:38 +01:00
Use varargs for syserr().
Pointed out by: snapshots.jp.freebsd.org warnings log.
This commit is contained in:
parent
54f3395319
commit
38764bffcf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98689
@ -42,6 +42,8 @@ static const char rcsid[] =
|
|||||||
/*
|
/*
|
||||||
** ASSORTED UTILITY ROUTINES
|
** ASSORTED UTILITY ROUTINES
|
||||||
*/
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <varargs.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** BLOCK MOVE
|
** BLOCK MOVE
|
||||||
@ -141,14 +143,19 @@ char *s;
|
|||||||
** SYSTEM ERROR
|
** SYSTEM ERROR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
syserr(p0, p1, p2, p3, p4, p5)
|
syserr(fmt, va_alist)
|
||||||
|
const char *fmt;
|
||||||
|
va_dcl
|
||||||
{
|
{
|
||||||
|
va_list ap;
|
||||||
extern int errno;
|
extern int errno;
|
||||||
|
|
||||||
|
va_start(ap);
|
||||||
printf("\n\07TREK SYSERR: ");
|
printf("\n\07TREK SYSERR: ");
|
||||||
printf(p0, p1, p2, p3, p4, p5);
|
vfprintf(stdout, fmt, ap);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
if (errno)
|
if (errno)
|
||||||
printf("\tsystem error %d\n", errno);
|
printf("\tsystem error %d\n", errno);
|
||||||
|
va_end(ap);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user