Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/stdio Set error indicator on invalid arguments. Fro...



details:   https://anonhg.NetBSD.org/src/rev/f93557d4f0d6
branches:  trunk
changeset: 767568:f93557d4f0d6
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Jul 22 23:12:30 2011 +0000

description:
Set error indicator on invalid arguments. From Carsten Hey.

diffstat:

 lib/libc/stdio/getdelim.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d0a7ec39cea8 -r f93557d4f0d6 lib/libc/stdio/getdelim.c
--- a/lib/libc/stdio/getdelim.c Fri Jul 22 22:50:55 2011 +0000
+++ b/lib/libc/stdio/getdelim.c Fri Jul 22 23:12:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getdelim.c,v 1.12 2009/12/07 21:31:43 roy Exp $ */
+/* $NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getdelim.c,v 1.12 2009/12/07 21:31:43 roy Exp $");
+__RCSID("$NetBSD: getdelim.c,v 1.13 2011/07/22 23:12:30 joerg Exp $");
 
 #include "namespace.h"
 
@@ -65,7 +65,7 @@
 
        if (buf == NULL || buflen == NULL) {
                errno = EINVAL;
-               return -1;
+               goto error;
        }
 
        /* If buf is NULL, we have to assume a size of zero */



Home | Main Index | Thread Index | Old Index