scd: Use same idiom for same work.

* scd/command.c (cmd_serialno, cmd_getattr): Use 'while' instead of
'for'.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2022-03-10 11:02:11 +09:00
parent eadf12a52c
commit d577ed2956
1 changed files with 4 additions and 4 deletions

View File

@ -343,8 +343,8 @@ cmd_serialno (assuan_context_t ctx, char *line)
if (*demand != '=')
return set_error (GPG_ERR_ASS_PARAMETER, "missing value for option");
line = (char *)++demand;
for (; *line && !spacep (line); line++)
;
while (*line && !spacep (line))
line++;
if (*line)
*line++ = 0;
}
@ -1229,8 +1229,8 @@ cmd_getattr (assuan_context_t ctx, char *line)
return rc;
keyword = line;
for (; *line && !spacep (line); line++)
;
while (*line && !spacep (line))
line++;
if (*line)
*line++ = 0;