remove octet_compare

strcmp provides the same functionality
This commit is contained in:
Dmitry Podgorny
2013-08-26 02:42:01 +03:00
parent e21bf8a18d
commit 32e18fb1a5
4 changed files with 5 additions and 32 deletions

View File

@@ -225,32 +225,6 @@ prof_getline(FILE *stream)
return s;
}
int
octet_compare(unsigned char *str1, unsigned char *str2)
{
if ((strcmp((char *)str1, "") == 0) && (strcmp((char *)str2, "") == 0)) {
return 0;
}
if ((strcmp((char *)str1, "") == 0) && (strcmp((char *)str2, "") != 0)) {
return -1;
}
if ((strcmp((char *)str1, "") != 0) && (strcmp((char *)str2, "") == 0)) {
return 1;
}
if (str1[0] == str2[0]) {
return octet_compare(&str1[1], &str2[1]);
}
if (str1[0] < str2[0]) {
return -1;
}
return 1;
}
char *
release_get_latest()
{