summaryrefslogtreecommitdiff
path: root/StdLib/LibC/Stdio/fseeko.c
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib/LibC/Stdio/fseeko.c')
-rw-r--r--StdLib/LibC/Stdio/fseeko.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/StdLib/LibC/Stdio/fseeko.c b/StdLib/LibC/Stdio/fseeko.c
index 3c406eaec8..7fc7e42661 100644
--- a/StdLib/LibC/Stdio/fseeko.c
+++ b/StdLib/LibC/Stdio/fseeko.c
@@ -1,6 +1,13 @@
-/* $NetBSD: fseeko.c,v 1.5 2005/03/04 16:04:58 dsl Exp $ */
+/*
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License that accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,15 +37,14 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+
+ NetBSD: fseeko.c,v 1.5 2005/03/04 16:04:58 dsl Exp
*/
//#include <Uefi.h> // REMOVE, For DEBUG only
//#include <Library/UefiLib.h> // REMOVE, For DEBUG only
#include <LibConfig.h>
#include <sys/EfiCdefs.h>
-#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: fseeko.c,v 1.5 2005/03/04 16:04:58 dsl Exp $");
-#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
#include <sys/types.h>
@@ -72,6 +78,10 @@ fseeko(FILE *fp, off_t offset, int whence)
int havepos;
_DIAGASSERT(fp != NULL);
+ if(fp == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
#ifdef __GNUC__
/* This outrageous construct just to shut up a GCC warning. */