Skip to content
Permalink
Browse files

Code cleanup

  • Loading branch information...
Cock3r
Cock3r committed Aug 27, 2019
1 parent 690296f commit 65912c9d53f8e2bb4a4a4f1dc5613432bfa6221c
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/data.c
@@ -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;
@@ -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;
}

0 comments on commit 65912c9

Please sign in to comment.
You can’t perform that action at this time.