ALT Linux repositórios
Group :: Escritórios
RPM: xneur
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: xneur-memset.patch
Download
Download
diff --git a/xneur/lib/misc/text.c b/xneur/lib/misc/text.c
index 9ab75c2..f809c9d 100644
--- a/xneur/lib/misc/text.c
+++ b/xneur/lib/misc/text.c
@@ -285,9 +285,7 @@ int levenshtein(const char *s, const char *t)
int ls = strlen(s), lt = strlen(t);
int d[ls + 1][lt + 1];
- for (int i = 0; i <= ls; i++)
- for (int j = 0; j <= lt; j++)
- d[i][j] = -1;
+ memset(d, -1, sizeof(int) * (ls + 1) * (lt + 1));
int dist(int i, int j) {
if (d[i][j] >= 0) return d[i][j];