From d49db7d0981861d979765647cce3c6468a012301 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 2 Mar 2020 16:19:08 -0500 Subject: Refactor startswith() and endswidth() usage --- src/spm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/spm.c') diff --git a/src/spm.c b/src/spm.c index 3e843c2..099b3f8 100644 --- a/src/spm.c +++ b/src/spm.c @@ -137,7 +137,7 @@ int main(int argc, char *argv[], char *arge[]) { for (int p = 0; i < argc; p++) { i++; char *next = argv[i]; - if (next == NULL || (startswith(next, "-") == 0 || startswith(next, "--") == 0)) { + if (next == NULL || (startswith(next, "-") || startswith(next, "--"))) { i--; break; } @@ -154,7 +154,7 @@ int main(int argc, char *argv[], char *arge[]) { for (int p = 0; i < argc; p++) { i++; char *next = argv[i]; - if (next == NULL || (startswith(next, "-") == 0 || startswith(next, "--") == 0)) { + if (next == NULL || (startswith(next, "-") || startswith(next, "--"))) { i--; break; } -- cgit