Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Commit

Permalink
Remove dead code.
Browse files Browse the repository at this point in the history
Reported by dcb314.
  • Loading branch information
Juliusz Chroboczek committed May 16, 2015
1 parent 74030a6 commit fa1e2fa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
20 changes: 0 additions & 20 deletions util.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,6 @@ snnprint_n(char *restrict buf, int n, int len, const char *s, int slen)
}

int
strcmp_n(const char *string, const char *buf, int n)
{
int i;
i = 0;
while(string[i] != '\0' && i < n) {
if(string[i] < buf[i])
return -1;
else if(string[i] > buf[i])
return 1;
i++;
}
if(string[i] == '\0' || i == n)
return 0;
else if(i == n)
return 1;
else
return -1;
}

int
letter(char c)
{
if(c >= 'A' && c <= 'Z') return 1;
Expand Down
1 change: 0 additions & 1 deletion util.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ int snnprintf(char *restrict buf, int n, int len, const char *format, ...)
int snnvprintf(char *restrict buf, int n, int len, const char *format, va_list args)
ATTRIBUTE ((format (printf, 4, 0)));
int snnprint_n(char *restrict buf, int n, int len, const char *s, int slen);
int strcmp_n(const char *string, const char *buf, int n) ATTRIBUTE ((pure));
int digit(char) ATTRIBUTE ((const));
int letter(char) ATTRIBUTE ((const));
char lwr(char) ATTRIBUTE ((const));
Expand Down

0 comments on commit fa1e2fa

Please sign in to comment.