From e8780449d820250f3525854c4f6385686be1f142 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 24 Jun 2025 05:47:36 -0400 Subject: [PATCH] remove redundant part from logical expressions --- src/write_coeff.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/write_coeff.cpp b/src/write_coeff.cpp index 19f512fab1..685afc3c39 100644 --- a/src/write_coeff.cpp +++ b/src/write_coeff.cpp @@ -154,8 +154,8 @@ void WriteCoeff::command(int narg, char **arg) // parse type number and skip over it int type = std::stoi(str); char *p = str; - while ((*p != '\0') && (*p == ' ')) ++p; - while ((*p != '\0') && isdigit(*p)) ++p; + while (*p == ' ') ++p; + while (isdigit(*p)) ++p; fprintf(two, "%s %d %s %s", coeff, type, section, p); utils::sfgets(FLERR, str, BUF_SIZE, one, file, error);