revert previous; if we examine SUS more closely we find that unless explictly specified, use of a NULL pointer is undefined
This commit is contained in:
parent
b3d9b0130c
commit
e0f82c3ae3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fread.c,v 1.11 1999/09/16 12:45:34 lukem Exp $ */
|
||||
/* $NetBSD: fread.c,v 1.12 1999/09/17 13:03:46 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)fread.c 8.2 (Berkeley) 12/11/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: fread.c,v 1.11 1999/09/16 12:45:34 lukem Exp $");
|
||||
__RCSID("$NetBSD: fread.c,v 1.12 1999/09/17 13:03:46 lukem Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@ -63,8 +63,6 @@ fread(buf, size, count, fp)
|
||||
int r;
|
||||
size_t total;
|
||||
|
||||
if (size == 0 || count == 0) /* check first, according to SUS */
|
||||
return (0);
|
||||
_DIAGASSERT(buf != NULL);
|
||||
_DIAGASSERT(fp != NULL);
|
||||
#ifdef _DIAGNOSTIC
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fwrite.c,v 1.10 1999/09/16 12:45:34 lukem Exp $ */
|
||||
/* $NetBSD: fwrite.c,v 1.11 1999/09/17 13:03:46 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)fwrite.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: fwrite.c,v 1.10 1999/09/16 12:45:34 lukem Exp $");
|
||||
__RCSID("$NetBSD: fwrite.c,v 1.11 1999/09/17 13:03:46 lukem Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@ -66,8 +66,6 @@ fwrite(buf, size, count, fp)
|
||||
struct __suio uio;
|
||||
struct __siov iov;
|
||||
|
||||
if (size == 0 || count == 0) /* check first, according to SUS */
|
||||
return (0);
|
||||
_DIAGASSERT(buf != NULL);
|
||||
_DIAGASSERT(fp != NULL);
|
||||
#ifdef _DIAGNOSTIC
|
||||
|
Loading…
Reference in New Issue
Block a user