This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Eliminate redundant conditional


2003-06-22  Max Bowsher  <maxb@ukf.net>

        * rfc1738.cc (rfc1738_do_escape): Eliminate redundant conditional.

Index: rfc1738.cc
===================================================================
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/rfc1738.cc,v
retrieving revision 2.4
diff -u -p -r2.4 rfc1738.cc
--- rfc1738.cc 1 May 2002 11:13:16 -0000 2.4
+++ rfc1738.cc 22 Jun 2003 19:14:38 -0000
@@ -129,8 +129,7 @@ rfc1738_do_escape (const char *url, int
    do_escape = 1;
  }
       /* RFC 1738 says any non-US-ASCII are encoded */
-      if (((unsigned char) *p >= (unsigned char) 0x80) &&
-   ((unsigned char) *p <= (unsigned char) 0xFF))
+      if ((unsigned char) *p >= (unsigned char) 0x80)
  {
    do_escape = 1;
  }


The expression "((unsigned char) *p <= (unsigned char) 0xFF))" is always
true.
(Found by gcc-3.3)


Max.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]