Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Cock3r committed Aug 27, 2019
1 parent 690296f commit 65912c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/data.c
Expand Up @@ -231,13 +231,13 @@ str_zipext(char *name)
int i;

i = strlen(name) - 1;
if ((i < 0 || (name[i] != 'p') && name[i] != 'P')) return 0;
if ((i < 0 || name[i] != 'p') && (name[i] != 'P')) return 0;
i--;
if ((i < 0 || (name[i] != 'i') && name[i] != 'I')) return 0;
if ((i < 0 || name[i] != 'i') && (name[i] != 'I')) return 0;
i--;
if ((i < 0 || (name[i] != 'z') && name[i] != 'Z')) return 0;
if ((i < 0 || name[i] != 'z') && (name[i] != 'Z')) return 0;
i--;
if ((i < 0) || (name[i] != '.')) return 0;
if (i < 0 || name[i] != '.') return 0;
i--;
if (i < 0) return 0;
return 1;
Expand All @@ -254,7 +254,7 @@ str_dup(char *s)

i = strlen(s) + 1;
s1 = malloc(i);
strncpy(s1, s, i);
strlcpy(s1, s, i);
return s1;
}

Expand Down

0 comments on commit 65912c9

Please sign in to comment.