From 74cfeaff30a16b3ad44cbff2b13f3b4d3f293843 Mon Sep 17 00:00:00 2001
From: kaysrishaq <62462173+kaysrishaq@users.noreply.github.com>
Date: Sun, 12 Jul 2020 07:56:25 -0400
Subject: [PATCH] A bit of cleaning

---
 src/dehacked.c    | 2 +-
 src/lua_infolib.c | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/dehacked.c b/src/dehacked.c
index f9cec3a51..976706948 100644
--- a/src/dehacked.c
+++ b/src/dehacked.c
@@ -840,7 +840,7 @@ static void readskincolor(MYFILE *f, INT32 num)
 					deh_warning("Skincolor %d: name %s is a duplicate of another skincolor's name - renamed to %s", num, oldword, truncword);
 				}
 
-				deh_strlcpy(skincolors[num].name, truncword, namesize, NULL); // already truncated
+				strlcpy(skincolors[num].name, truncword, namesize); // already truncated
 			}
 			else if (fastcmp(word, "RAMP"))
 			{
diff --git a/src/lua_infolib.c b/src/lua_infolib.c
index c745d8323..e58b9d4ba 100644
--- a/src/lua_infolib.c
+++ b/src/lua_infolib.c
@@ -1561,8 +1561,7 @@ static int lib_setSkinColor(lua_State *L)
 			UINT16 v = (UINT16)luaL_checkinteger(L, 3);
 			if (v >= numskincolors)
 				return luaL_error(L, "attempt to set skincolors[%d].invcolor to out of range value %d.", cnum, v);
-			else
-				info->invcolor = v;
+			info->invcolor = v;
 		} else if (i == 4 || (str && fastcmp(str,"invshade")))
 			info->invshade = (UINT8)luaL_checkinteger(L, 3)%COLORRAMPSIZE;
 		else if (i == 5 || (str && fastcmp(str,"chatcolor")))
@@ -1644,8 +1643,7 @@ static int skincolor_set(lua_State *L)
 		UINT16 v = (UINT16)luaL_checkinteger(L, 3);
 		if (v >= numskincolors)
 			return luaL_error(L, "attempt to set skincolor_t field 'invcolor' to out of range value %d.", v);
-		else
-			info->invcolor = v;
+		info->invcolor = v;
 	} else if (fastcmp(field,"invshade"))
 		info->invshade = (UINT8)luaL_checkinteger(L, 3)%COLORRAMPSIZE;
 	else if (fastcmp(field,"chatcolor"))
-- 
GitLab