Module Name: src
Committed By: christos
Date: Wed Sep 21 01:33:53 UTC 2022
Modified Files:
src/lib/libedit: readline.c
Log Message:
PR/57016: Ricky Zhou: declare lastidx
To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 src/lib/libedit/readline.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/readline.c
diff -u src/lib/libedit/readline.c:1.175 src/lib/libedit/readline.c:1.176
--- src/lib/libedit/readline.c:1.175 Tue Sep 20 19:41:14 2022
+++ src/lib/libedit/readline.c Tue Sep 20 21:33:53 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.c,v 1.175 2022/09/20 23:41:14 christos Exp $ */
+/* $NetBSD: readline.c,v 1.176 2022/09/21 01:33:53 christos Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.175 2022/09/20 23:41:14 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.176 2022/09/21 01:33:53 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -478,6 +478,8 @@ readline(const char *p)
ret = el_gets(e, &count);
if (ret && count > 0) {
+ int lastidx;
+
buf = strdup(ret);
if (buf == NULL)
goto out;