checkwps: Simplify expression.

Change-Id: I4d5cf82aa753074f81f25ae3d89a97ee607376e5
This commit is contained in:
Thomas Martitz 2012-07-31 10:05:58 +02:00
parent 63d27626e4
commit b358bcfc25

View file

@ -294,9 +294,8 @@ int main(int argc, char **argv)
while (argv[filearg]) {
printf("Checking %s...\n", argv[filearg]);
#ifdef HAVE_REMOTE_LCD
if((strcmp(&argv[filearg][strlen(argv[filearg])-4], "rwps") == 0) ||
(strcmp(&argv[filearg][strlen(argv[filearg])-4], "rsbs") == 0) ||
(strcmp(&argv[filearg][strlen(argv[filearg])-4], "rfms") == 0))
char *ext = strrchr(argv[filearg], '.');
if (strcmp(ext, "rwps") == 0 || strcmp(ext, "rsbs") == 0 || strcmp(ext, "rfms") == 0)
screen = SCREEN_REMOTE;
else
screen = SCREEN_MAIN;