util.strbitop: Remove redundant init function 0.11
authorKim Alvefur <zash@zash.se>
Thu, 15 Oct 2020 17:05:53 +0200
branch0.11
changeset 11175 2c1583bb0e0f
parent 11173 6dde2c9fa272
child 11176 712b2e6a09d9
util.strbitop: Remove redundant init function When you have 3 almost identical functions, you tend to edit one and then copypaste. Forgot to remove this line from the other two.
util-src/strbitop.c
--- a/util-src/strbitop.c	Thu Oct 15 16:43:30 2020 +0200
+++ b/util-src/strbitop.c	Thu Oct 15 17:05:53 2020 +0200
@@ -20,8 +20,6 @@
 	const char *str_a = luaL_checklstring(L, 1, &a);
 	const char *str_b = luaL_checklstring(L, 2, &b);
 
-	luaL_buffinit(L, &buf);
-
 	if(a == 0 || b == 0) {
 		lua_settop(L, 1);
 		return 1;
@@ -44,8 +42,6 @@
 	const char *str_a = luaL_checklstring(L, 1, &a);
 	const char *str_b = luaL_checklstring(L, 2, &b);
 
-	luaL_buffinit(L, &buf);
-
 	if(a == 0 || b == 0) {
 		lua_settop(L, 1);
 		return 1;