]> granicus.if.org Git - apache/commitdiff
More signedness fixes
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 25 Jul 2001 21:47:20 +0000 (21:47 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 25 Jul 2001 21:47:20 +0000 (21:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89715 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_autoindex.c

index 90575c5d86a71ace0003e64d6837b89881b9844a..7d4b8093231a3fd2aeded4d07ef88cd480e6d265 100644 (file)
@@ -913,8 +913,8 @@ static int ignore_entry(autoindex_config_rec *d, char *path)
 static void do_emit_plain(request_rec *r, apr_file_t *f)
 {
     char buf[AP_IOBUFSIZE + 1];
-    int i, c, ch;
-    apr_size_t n;
+    int ch;
+    apr_size_t i, c, n;
     apr_status_t stat;
 
     ap_rputs("<PRE>\n", r);
@@ -924,7 +924,8 @@ static void do_emit_plain(request_rec *r, apr_file_t *f)
            stat = apr_file_read(f, buf, &n);
        }
        while (stat != APR_SUCCESS && APR_STATUS_IS_EINTR(stat));
-       if (n == -1 || n == 0) {
+       if (n == 0 || stat != APR_SUCCESS) {
+            /* ###: better error here? */
            break;
        }
        buf[n] = '\0';