]> arthur.barton.de Git - netatalk.git/commitdiff
fix bogus casts, from Olaf Hering (olh at suse.de)
authorbfernhomberg <bfernhomberg>
Wed, 11 Aug 2004 03:13:21 +0000 (03:13 +0000)
committerbfernhomberg <bfernhomberg>
Wed, 11 Aug 2004 03:13:21 +0000 (03:13 +0000)
etc/afpd/catsearch.c
etc/afpd/filedir.c

index 72a1c685e31377795eb187c3aa60a015636844fa..b3817247671bd7f1ecf971bad7f3758d8beb944b 100644 (file)
@@ -274,6 +274,7 @@ static int crit_check(struct vol *vol, struct path *path, int cidx) {
        struct finderinfo *finfo = NULL, finderinfo;
        struct adouble *adp = NULL;
        time_t c_date, b_date;
+       u_int32_t ac_date, ab_date;
        static char convbuf[512];
        size_t len;
 
@@ -340,8 +341,8 @@ static int crit_check(struct vol *vol, struct path *path, int cidx) {
        /* Check for creation date... */
        if (c1.rbitmap & (1<<DIRPBIT_CDATE)) {
                if (adp || (adp = adl_lkup(vol, path))) {
-                       if (ad_getdate(adp, AD_DATE_CREATE, (u_int32_t*)&c_date) >= 0)
-                               c_date = AD_DATE_TO_UNIX(c_date);
+                       if (ad_getdate(adp, AD_DATE_CREATE, &ac_date) >= 0)
+                               c_date = AD_DATE_TO_UNIX(ac_date);
                        else c_date = path->st.st_mtime;
                } else c_date = path->st.st_mtime;
                if (c_date < c1.cdate || c_date > c2.cdate)
@@ -351,8 +352,8 @@ static int crit_check(struct vol *vol, struct path *path, int cidx) {
        /* Check for backup date... */
        if (c1.rbitmap & (1<<DIRPBIT_BDATE)) {
                if (adp || (adp == adl_lkup(vol, path))) {
-                       if (ad_getdate(adp, AD_DATE_BACKUP, (u_int32_t*)&b_date) >= 0)
-                               b_date = AD_DATE_TO_UNIX(b_date);
+                       if (ad_getdate(adp, AD_DATE_BACKUP, &ab_date) >= 0)
+                               b_date = AD_DATE_TO_UNIX(ab_date);
                        else b_date = path->st.st_mtime;
                } else b_date = path->st.st_mtime;
                if (b_date < c1.bdate || b_date > c2.bdate)
index f5d2367b282deb3c9e0143d72656f7c7c9b85ea0..00e3e41c5e97b891db5009ece4ac4e5eb679324e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: filedir.c,v 1.45.2.2.2.11 2004-05-10 18:40:32 didg Exp $
+ * $Id: filedir.c,v 1.45.2.2.2.12 2004-08-11 03:13:21 bfernhomberg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -345,6 +345,7 @@ int         isdir;
     struct path         path;
     cnid_t      id;
     ucs2_t *oldname_w, *newname_w;
+    void *oldname_w_p = &oldname_w, *newname_w_p = &newname_w;
 
     ad_init(&ad, vol->v_adouble);
     adp = &ad;
@@ -407,11 +408,11 @@ int         isdir;
         /* deal with case insensitive, case-preserving filesystems. */
         if ((stat(upath, st) == 0)) {
            if ((size_t)-1 == (convert_string_allocate(vol->v_volcharset, CH_UCS2, oldname,
-                                strlen(oldname), (char**) &oldname_w)) ) {
+                                strlen(oldname), oldname_w_p)) ) {
                 return AFPERR_MISC; /* conversion error has already been logged */
             }
            if ((size_t)-1 == (convert_string_allocate(vol->v_volcharset, CH_UCS2, newname, 
-                                strlen(newname), (char**) &newname_w)) ) {
+                                strlen(newname), newname_w_p)) ) {
                 free(oldname_w);
                 return AFPERR_MISC; /* conversion error has already been logged */
             }