]> granicus.if.org Git - apache/commitdiff
clean up a bunch of warnings
authorJeff Trawick <trawick@apache.org>
Sat, 19 Jan 2002 12:16:48 +0000 (12:16 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 19 Jan 2002 12:16:48 +0000 (12:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92931 13f79535-47bb-0310-9956-ffa450edef68

support/htdbm.c

index c0e280eadce2032309fd380023937a62ebe448ce..42eab884c8191dfecb56f628ec934bb2ef3c684d 100644 (file)
@@ -84,6 +84,7 @@
 #if APR_HAVE_STRINGS_H
 #include <strings.h>
 #endif
+#include <time.h>
 
 #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;