From 9a6be3e53feb1a32e446419c6fef910eeca74f01 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Thu, 17 Apr 2008 09:20:20 +0200 Subject: [PATCH] Use sizeof() instead of direct element count in rpmluaGetVar() --- rpmio/rpmlua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmio/rpmlua.c b/rpmio/rpmlua.c index 5a94bf3..096a411 100644 --- a/rpmio/rpmlua.c +++ b/rpmio/rpmlua.c @@ -220,7 +220,7 @@ static int findkey(lua_State *L, int oper, const char *key, va_list va) char buf[BUFSIZ]; const char *s, *e; int ret = 0; - (void) vsnprintf(buf, BUFSIZ, key, va); + (void) vsnprintf(buf, sizeof(buf), key, va); s = e = buf; lua_pushvalue(L, LUA_GLOBALSINDEX); for (;;) { -- 2.7.4