httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 12616] New: - Incorrect comparisons in apr-util/misc/apr_rmm.c
Date Fri, 13 Sep 2002 14:56:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12616>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12616

Incorrect comparisons in apr-util/misc/apr_rmm.c

           Summary: Incorrect comparisons in apr-util/misc/apr_rmm.c
           Product: APR
           Version: HEAD
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: APR-util
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: tenthumbs@cybernex.net


I found this while building apache 2.0.40 but it's in the current tarballs.

In apr-util/misc/apr_rmm.c, Linux gcc 3.1.1 says

  apr_rmm.c:382: warning: comparison of unsigned expression < 0 is
    always false
  apr_rmm.c:386: warning: comparison of unsigned expression >= 0 is
    always true

The code is 
   382      if ((this = apr_rmm_malloc(rmm, reqsize)) < 0) {
   383          return this;
   384      }
   385
   386      if (old >= 0) {
   387          memcpy(apr_rmm_addr_get(rmm, this),
   388                 apr_rmm_addr_get(rmm, old), reqsize);
   389          apr_rmm_free(rmm, old);
   390      }

If "return this" is supposed to be an error signal of some sort, it's not
happening.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message