From 51ce0299d742c3a8e2ac67c3134716e8988064f1 Mon Sep 17 00:00:00 2001
From: Etienne Brateau <etienne.brateau@ensiie.fr>
Date: Fri, 18 Jan 2019 22:23:57 +0100
Subject: [PATCH] comparestr: remove usage of deprecated strcpy_overlap

---
 log/src/log.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/log/src/log.c b/log/src/log.c
index 29c5e50..263d79a 100644
--- a/log/src/log.c
+++ b/log/src/log.c
@@ -5984,17 +5984,17 @@ static void centercommand()
 /*=                                              =*/
 /*================================================*/
 
-static int comparestr(char *s_, short g, char *t_)
+static int comparestr(char *s_, uchar g, char *t_)
 {
 	int Result;
-	char s[9], t[9];
+	char *s, *t;
 	char ch;
 	short i;
 	int match;
 	short FORLIM;
 
-	strcpy(s, s_);
-	strcpy(t, t_);
+	s = s_;
+	t = t_;
 	if (*t == '\0' || !strcmp(s, t))
 	{
 		return (strcmp(s, t) == 0);
@@ -6004,12 +6004,12 @@ static int comparestr(char *s_, short g, char *t_)
 		ch = t[0];
 		if (ch == '*' || ch == '?' || ch == '=')
 		{
-			strcpy_overlap(t, t + 1);
+			t++;
 			do
 			{
 				match = comparestr(s, g, t);
 				if (!match && *s != '\0')
-					strcpy_overlap(s, s + 1);
+					s++;
 			} while (!(match || *s == '\0'));
 			return (match || comparestr(s, g, t));
 		}
@@ -6028,8 +6028,8 @@ static int comparestr(char *s_, short g, char *t_)
 		}
 		else if (*s != '\0' && (ch == '%' || ch == s[0]))
 		{
-			strcpy_overlap(s, s + 1);
-			strcpy_overlap(t, t + 1);
+			s++;
+			t++;
 			return (comparestr(s, g, t));
 		}
 		else
-- 
GitLab