r23779: Change from v2 or later to v3 or later.
[samba.git] / source3 / lib / gencache.c
index d6f5584c12fd94b228ee364d9ad1db6de0bfdd64..5bb29e096b327b49e2be4a6e325f0d692296f0aa 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -205,7 +205,7 @@ BOOL gencache_get(const char *keystr, char **valstr, time_t *timeout)
                return False;
        }
 
-       t = strtol(databuf.dptr, &endptr, 10);
+       t = strtol((const char *)databuf.dptr, &endptr, 10);
 
        if ((endptr == NULL) || (*endptr != '/')) {
                DEBUG(2, ("Invalid gencache data format: %s\n", databuf.dptr));
@@ -279,7 +279,7 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time
                char *fmt;
 
                /* ensure null termination of the key string */
-               keystr = SMB_STRNDUP(node->node_key.dptr, node->node_key.dsize);
+               keystr = SMB_STRNDUP((const char *)node->node_key.dptr, node->node_key.dsize);
                if (!keystr) {
                        break;
                }
@@ -295,7 +295,7 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time
                        node = node->next;
                        continue;
                }
-               entry = SMB_STRNDUP(databuf.dptr, databuf.dsize);
+               entry = SMB_STRNDUP((const char *)databuf.dptr, databuf.dsize);
                if (!entry) {
                        SAFE_FREE(databuf.dptr);
                        SAFE_FREE(keystr);