diff options
author | Rose <83477269+AtariDreams@users.noreply.github.com> | 2021-10-21 20:47:39 (GMT) |
---|---|---|
committer | Rose <83477269+AtariDreams@users.noreply.github.com> | 2021-10-23 15:30:27 (GMT) |
commit | dd918c517dc32002f44e74b0cdc6fb32cd7bee34 (patch) | |
tree | fba67b4be872eca2a515046b2e7aa12f2d3b1957 /Source/CursesDialog | |
parent | 46bd57d2450e450da4f46f5cb45cb8d1dc617d96 (diff) | |
download | CMake-dd918c517dc32002f44e74b0cdc6fb32cd7bee34.zip CMake-dd918c517dc32002f44e74b0cdc6fb32cd7bee34.tar.gz CMake-dd918c517dc32002f44e74b0cdc6fb32cd7bee34.tar.bz2 |
Source: Simplify some boolean expressions
Diffstat (limited to 'Source/CursesDialog')
-rw-r--r-- | Source/CursesDialog/form/fty_enum.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CursesDialog/form/fty_enum.c b/Source/CursesDialog/form/fty_enum.c index 59058a9..f1059b1 100644 --- a/Source/CursesDialog/form/fty_enum.c +++ b/Source/CursesDialog/form/fty_enum.c @@ -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); } /*--------------------------------------------------------------------------- |