From: Jeff Trawick Date: Sat, 19 Jan 2002 12:16:48 +0000 (+0000) Subject: clean up a bunch of warnings X-Git-Tag: 2.0.31~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37bdc63e3b7bb538774e1aa211298a3b62944d7d;p=apache clean up a bunch of warnings git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92931 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htdbm.c b/support/htdbm.c index c0e280eadc..42eab884c8 100644 --- a/support/htdbm.c +++ b/support/htdbm.c @@ -84,6 +84,7 @@ #if APR_HAVE_STRINGS_H #include #endif +#include #if APR_CHARSET_EBCDIC #include "apr_xlate.h" @@ -214,25 +215,6 @@ static apr_status_t htdbm_open(htdbm_t *htdbm) APR_OS_DEFAULT, htdbm->pool); } -static char * ap_getword(apr_pool_t *atrans, char **line, char stop) -{ - char *pos = strrchr(*line, stop); - char *res; - - if (!pos) { - res = apr_pstrdup(atrans, *line); - *line += strlen(*line); - return res; - } - - res = apr_pstrndup(atrans, *line, pos - *line); - - while (*pos == stop) - ++pos; - *line = pos; - return res; -} - static apr_status_t htdbm_save(htdbm_t *htdbm, int *changed) { apr_datum_t key, val; @@ -498,9 +480,9 @@ int main(int argc, const char *argv[]) break; case 'T': h->type = apr_pstrdup(h->pool, ++arg); - while (*arg !='\0') - *++arg; - *--arg; /* so incrementing this in the loop with find a null */ + while (*arg != '\0') + ++arg; + --arg; /* so incrementing this in the loop with find a null */ break; case 'v': h->rdonly = 1;