From: Daiki Ueno Date: Mon, 11 Nov 2013 08:56:00 +0000 (+0900) Subject: Fix misuse of a logical operator. X-Git-Tag: v0.18.3.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee095ad1e921a5b78755552bf1fa465b72eae224;p=thirdparty%2Fgettext.git Fix misuse of a logical operator. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index ebe7ed9de..4e3891a61 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,10 @@ +2013-11-11 Daiki Ueno + + * x-c.c (phase5_get): Fix misuse of a logical operator. + * x-perl.c (extract_quotelike_pass3): Likewise. + * x-vala.c (phase3_get): Likewise. + Reported by David Binderman at: . + 2013-08-12 Daiki Ueno * xgettext.c (remember_a_message): Handle multi-line extracted diff --git a/gettext-tools/src/x-c.c b/gettext-tools/src/x-c.c index ea0a874a9..8af7429bb 100644 --- a/gettext-tools/src/x-c.c +++ b/gettext-tools/src/x-c.c @@ -1171,7 +1171,7 @@ phase5_get (token_ty *tp) } buffer[bufpos++] = c; c = phase4_getc (); - if (c != '+' || c != '-') + if (c != '+' && c != '-') { phase4_ungetc (c); break; diff --git a/gettext-tools/src/x-perl.c b/gettext-tools/src/x-perl.c index c7843c405..571f6dee5 100644 --- a/gettext-tools/src/x-perl.c +++ b/gettext-tools/src/x-perl.c @@ -1085,7 +1085,7 @@ extract_quotelike_pass3 (token_ty *tp, int error_level) if (*crs) { int the_char = (unsigned char) *crs; - if (the_char >= 'a' || the_char <= 'z') + if (the_char >= 'a' && the_char <= 'z') the_char = the_char - 'a' + 'A'; buffer[bufpos++] = the_char ^ 0x40; } diff --git a/gettext-tools/src/x-vala.c b/gettext-tools/src/x-vala.c index 2faa513ee..68c8d9ceb 100644 --- a/gettext-tools/src/x-vala.c +++ b/gettext-tools/src/x-vala.c @@ -715,7 +715,7 @@ phase3_get (token_ty *tp) } buffer[bufpos++] = c; c = phase2_getc (); - if (c != '+' || c != '-') + if (c != '+' && c != '-') { phase2_ungetc (c); break;