mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-03 16:05:20 -05:00
Small code refactor to work around mis-detect static code analyzer.
This commit is contained in:
parent
fb11b8ceb6
commit
1f76e2c3f3
1 changed files with 4 additions and 1 deletions
|
@ -684,9 +684,12 @@ unsigned int levenshtein ( const char *needle, const glong needlelen, const char
|
|||
return UINT_MAX;
|
||||
}
|
||||
unsigned int column[needlelen + 1];
|
||||
for ( glong y = 0; y <= needlelen; y++ ) {
|
||||
for ( glong y = 0; y < needlelen; y++ ) {
|
||||
column[y] = y;
|
||||
}
|
||||
// Removed out of the loop, otherwise static code analyzers think it is unset.. silly but true.
|
||||
// old loop: for ( glong y = 0; y <= needlelen; y++)
|
||||
column[needlelen] = needlelen;
|
||||
for ( glong x = 1; x <= haystacklen; x++ ) {
|
||||
const char *needles = needle;
|
||||
column[0] = x;
|
||||
|
|
Loading…
Add table
Reference in a new issue