]> granicus.if.org Git - apache/commitdiff
Silence gcc warning about rv being used when possibly uninitialized. That
authorCliff Woolley <jwoolley@apache.org>
Mon, 11 Jun 2001 14:46:30 +0000 (14:46 +0000)
committerCliff Woolley <jwoolley@apache.org>
Mon, 11 Jun 2001 14:46:30 +0000 (14:46 +0000)
can only happen if n<=1 (ie, a bad parameter value), so I figure APR_EINVAL
is the correct default value.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89333 13f79535-47bb-0310-9956-ffa450edef68

support/htdigest.c

index 37c0485ed63242c687cf7ae2b3464c68150b3833..511921089fdfe200394f293de7f187920de50fb7 100644 (file)
@@ -122,7 +122,7 @@ static int getline(char *s, int n, apr_file_t *f)
 {
     register int i = 0;
     char ch;
-    apr_status_t rv;
+    apr_status_t rv = APR_EINVAL;
 
     while (i < (n - 1) && 
            ((rv = apr_file_getc(&ch, f)) == APR_SUCCESS) && (ch != '\n')) {