Module Name: src
Committed By: christos
Date: Fri Apr 13 02:20:50 UTC 2012
Modified Files:
src/lib/libc/gen: getpass.c
Log Message:
unconfuse lint; XXX: should really fix lint.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/lib/libc/gen/getpass.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/libc/gen/getpass.c
diff -u src/lib/libc/gen/getpass.c:1.20 src/lib/libc/gen/getpass.c:1.21
--- src/lib/libc/gen/getpass.c:1.20 Thu Apr 12 19:16:38 2012
+++ src/lib/libc/gen/getpass.c Thu Apr 12 22:20:50 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: getpass.c,v 1.20 2012/04/12 23:16:38 christos Exp $ */
+/* $NetBSD: getpass.c,v 1.21 2012/04/13 02:20:50 christos Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getpass.c,v 1.20 2012/04/12 23:16:38 christos Exp $");
+__RCSID("$NetBSD: getpass.c,v 1.21 2012/04/13 02:20:50 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -203,8 +203,9 @@ getpassfd(const char *prompt, char *buf,
add:
if (l >= len) {
if (allocated) {
+ char *b;
len += 1024;
- char *b = realloc(buf, len);
+ b = realloc(buf, len);
if (b == NULL)
goto restore;
buf = b;