Don't assign semun if __lint__.

This commit is contained in:
thorpej 2002-01-03 01:55:49 +00:00
parent 7efc72e894
commit 9e65d921df
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: __semctl13.c,v 1.1 2000/01/31 15:14:19 christos Exp $ */ /* $NetBSD: __semctl13.c,v 1.2 2002/01/03 01:55:49 thorpej Exp $ */
/*- /*-
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: __semctl13.c,v 1.1 2000/01/31 15:14:19 christos Exp $"); __RCSID("$NetBSD: __semctl13.c,v 1.2 2002/01/03 01:55:49 thorpej Exp $");
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <sys/types.h> #include <sys/types.h>
@ -80,7 +80,11 @@ int __semctl13(va_alist)
case GETALL: case GETALL:
case SETVAL: case SETVAL:
case SETALL: case SETALL:
#ifdef __lint__
memcpy(&semun, &semun, sizeof(semun));
#else
semun = va_arg(ap, union __semun); semun = va_arg(ap, union __semun);
#endif
} }
va_end(ap); va_end(ap);
return ____semctl13(semid, semnum, cmd, &semun); return ____semctl13(semid, semnum, cmd, &semun);