Skip to content

Commit

Permalink
Remove memset call
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Mar 25, 2020
1 parent a742b86 commit 22a60aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/jaro_winkler/jaro.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ double jaro_distance_from_codes(uint32_t *codepoints1, size_t len1,
if (window_size < 0)
window_size = 0;

char * short_codes_flag = malloc(len1*sizeof(char));
char * long_codes_flag = malloc(len2*sizeof(char));
memset(short_codes_flag, 0, len1);
memset(long_codes_flag, 0, len2);
char * short_codes_flag;
char * long_codes_flag;
short_codes_flag = (char*)malloc(len1*sizeof(char));
long_codes_flag = (char*)malloc(len2*sizeof(char));

// count number of matching characters
size_t match_count = 0;
Expand Down

0 comments on commit 22a60aa

Please sign in to comment.