From cf9dbff890f98af77711a82fb692f58d7aed3849 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 1 Apr 2017 18:22:12 +0200 Subject: [PATCH] inpcom.c, cleanup, use strchr() --- src/frontend/inpcom.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 78a988d23..5a0c9765a 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -5431,14 +5431,13 @@ inp_temper_compat(struct line *card) continue; } /* exclude some elements */ - if ((*curr_line == '*') || (*curr_line == 'v') || (*curr_line == 'b') || (*curr_line == 'i') || - (*curr_line == 'e') || (*curr_line == 'g') || (*curr_line == 'f') || (*curr_line == 'h')) + if (strchr("*vbiegfh", curr_line[0])) continue; /* exclude all dot commands except .model */ - if ((*curr_line == '.') && (!prefix(".model", curr_line))) + if (curr_line[0] == '.' && !prefix(".model", curr_line)) continue; /* exclude lines not containing 'temper' */ - if (strstr(curr_line, "temper") == NULL) + if (!strstr(curr_line, "temper")) continue; /* now start processing of the remaining lines containing 'temper' */ /* remove white spaces of everything inside {}*/