Source: Simplify some boolean expressions

This commit is contained in:
Rose
2021-10-21 16:47:39 -04:00
parent 46bd57d245
commit dd918c517d
4 changed files with 11 additions and 12 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ static int Compare(const unsigned char *s, const unsigned char *buf,
if (*buf=='\0')
{
return (((*s)!='\0') ? NOMATCH : EXACT);
return (((*s)=='\0') ? EXACT : NOMATCH);
}
else
{
@@ -144,7 +144,7 @@ static int Compare(const unsigned char *s, const unsigned char *buf,
/* If it happens that the reference buffer is at its end, the partial
match is actually an exact match. */
return ((s[-1]!='\0') ? PARTIAL : EXACT);
return ((s[-1]=='\0') ? EXACT : PARTIAL);
}
/*---------------------------------------------------------------------------