Module Name:    src
Committed By:   christos
Date:           Wed Jul 22 15:57:00 UTC 2009

Modified Files:
        src/lib/libedit: read.c

Log Message:
Always initialize nread since it is an out param.
>From Michael Cook mcook at bbn dot com


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/lib/libedit/read.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libedit/read.c
diff -u src/lib/libedit/read.c:1.51 src/lib/libedit/read.c:1.52
--- src/lib/libedit/read.c:1.51	Tue Jun  9 09:04:33 2009
+++ src/lib/libedit/read.c	Wed Jul 22 11:57:00 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: read.c,v 1.51 2009/06/09 13:04:33 christos Exp $	*/
+/*	$NetBSD: read.c,v 1.52 2009/07/22 15:57:00 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)read.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: read.c,v 1.51 2009/06/09 13:04:33 christos Exp $");
+__RCSID("$NetBSD: read.c,v 1.52 2009/07/22 15:57:00 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -422,6 +422,7 @@
 
 	if (nread == NULL)
 		nread = &nrb;
+	*nread = 0;
 
 	if (el->el_flags & NO_TTY) {
 		char *cp = el->el_line.buffer;

Reply via email to