summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-08-30 19:25:44 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-08-30 19:48:29 -0700
commit5c4ad167f745d4351e7ce5419f80ed14393ff52b (patch)
tree83873b80184a58567d8fac008f10f1a6e14581fa /match.c
parentaa98e4a4f0ef111902e6fd0faf24c8daf953330a (diff)
D[0][0] need not be initialized to 0
Diffstat (limited to 'match.c')
-rw-r--r--match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/match.c b/match.c
index 5c68cd8..a50aab3 100644
--- a/match.c
+++ b/match.c
@@ -111,7 +111,7 @@ double calculate_score(const char *needle, const char *haystack, size_t *positio
for(int i = 0; i < n; i++){
for(int j = 0; j < m; j++){
- score_t score = (j || i) ? SCORE_MIN : 0;
+ score_t score = SCORE_MIN;
int match = tolower(needle[i]) == tolower(haystack[j]);
D[i][j] = SCORE_MIN;
if(match){