diff --git a/lib/libedit/el.c b/lib/libedit/el.c index 809af41b6949..908c55b65033 100644 --- a/lib/libedit/el.c +++ b/lib/libedit/el.c @@ -1,4 +1,4 @@ -/* $NetBSD: el.c,v 1.69 2011/11/18 20:22:03 christos Exp $ */ +/* $NetBSD: el.c,v 1.70 2012/03/11 21:14:56 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94"; #else -__RCSID("$NetBSD: el.c,v 1.69 2011/11/18 20:22:03 christos Exp $"); +__RCSID("$NetBSD: el.c,v 1.70 2012/03/11 21:14:56 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -219,7 +219,7 @@ FUN(el,set)(EditLine *el, int op, ...) const Char *argv[20]; int i; - for (i = 1; i < 20; i++) + for (i = 1; i < (int)__arraycount(argv); i++) if ((argv[i] = va_arg(ap, Char *)) == NULL) break; @@ -419,7 +419,7 @@ FUN(el,get)(EditLine *el, int op, ...) char *argv[20]; int i; - for (i = 1; i < (int)(sizeof(argv) / sizeof(argv[0])); i++) + for (i = 1; i < (int)__arraycount(argv); i++) if ((argv[i] = va_arg(ap, char *)) == NULL) break;