From: Niels Möller Date: Wed, 16 Apr 2014 04:40:57 +0000 (+0200) Subject: Deleted useless for loop X-Git-Tag: nettle_3.0_release_20140607~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=582f234e00c019e6009bea7ab84cb615041cde94;p=thirdparty%2Fnettle.git Deleted useless for loop --- diff --git a/ChangeLog b/ChangeLog index 51b355cd..3f1f3f5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-04-16 Niels Möller + + * tools/input.c (sexp_get_quoted_char): Deleted useless for loop. + 2014-04-13 Niels Möller * rsa-compat.c: Deleted file. diff --git a/tools/input.c b/tools/input.c index f2b57f0a..b8085a4e 100644 --- a/tools/input.c +++ b/tools/input.c @@ -150,41 +150,40 @@ sexp_get_quoted_char(struct sexp_input *input) { sexp_next_char(input); - for (;;) - switch (input->c) - { - default: - return 1; - case '\"': - return 0; - case '\\': - sexp_next_char(input); + switch (input->c) + { + default: + return 1; + case '\"': + return 0; + case '\\': + sexp_next_char(input); - switch (input->c) - { - case 'b': input->c = '\b'; return 1; - case 't': input->c = '\t'; return 1; - case 'n': input->c = '\n'; return 1; - case 'f': input->c = '\f'; return 1; - case 'r': input->c = '\r'; return 1; - case '\\': input->c = '\\'; return 1; - case 'o': - case 'x': - /* FIXME: Not implemnted */ - abort(); - case '\n': - if (sexp_next_char(input) == '\r') - sexp_next_char(input); - - break; - case '\r': - if (sexp_next_char(input) == '\n') - sexp_next_char(input); - - break; - } - return 1; - } + switch (input->c) + { + case 'b': input->c = '\b'; return 1; + case 't': input->c = '\t'; return 1; + case 'n': input->c = '\n'; return 1; + case 'f': input->c = '\f'; return 1; + case 'r': input->c = '\r'; return 1; + case '\\': input->c = '\\'; return 1; + case 'o': + case 'x': + /* FIXME: Not implemnted */ + abort(); + case '\n': + if (sexp_next_char(input) == '\r') + sexp_next_char(input); + + break; + case '\r': + if (sexp_next_char(input) == '\n') + sexp_next_char(input); + + break; + } + return 1; + } } static void