]> arthur.barton.de Git - netatalk.git/commitdiff
Fixes, from Riccardo Magliocchetti
authorFrank Lahm <franklahm@googlemail.com>
Mon, 5 Mar 2012 12:04:40 +0000 (13:04 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Mon, 5 Mar 2012 12:04:40 +0000 (13:04 +0100)
etc/afpd/afs.c
etc/afpd/appl.c
etc/afpd/catsearch.c

index 377d5fb5a6389c2d99a3faf0f0b220f8dc71a741..9d6835f4d79592f5dc5e774b31df38580437a0a4 100644 (file)
 #include "misc.h"
 #include "unix.h"
 
-int afs_getvolspace( vol, bfree, btotal, bsize )
-struct vol     *vol;
-VolSpace       *bfree, *btotal;
-u_int32_t   *bsize;
+int afs_getvolspace(struct vol *vol, VolSpace *bfree, VolSpace *btotal, u_int32_t *bsize)
 {
     struct ViceIoctl   vi;
     struct VolumeStatus        *vs;
@@ -129,12 +126,7 @@ int afp_getdiracl(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *r
     #undef accessmode
 #endif
 
-void afsmode( vol, path, ma, dir, st )
-const struct volume *vol;
-char           *path;
-struct maccess *ma;
-struct dir      *dir;
-struct stat     *st;
+void afsmode(const struct volume *vol, char *path, struct maccess *ma, struct dir *dir, struct stat *st)
 {
     struct ViceIoctl   vi;
     char               buf[ 1024 ];
index d791d280843e842e61ea8f7ddbcd891a3a1101c5..78b7587d8b829c7c89b4fb6fd828b10aea07a323 100644 (file)
@@ -335,6 +335,7 @@ int afp_rmvappl(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_, siz
     mpath = obj->newtmp;
     mp = makemacpath( vol, mpath, AFPOBJ_TMPSIZ, curdir, path->m_name );
     if (!mp) {
+        close(tfd);
         return AFPERR_PARAM ;
     }
 
index bab0cbc64cae17ab444c76b9dfcf46a6054bcb6f..dfff4f0ef19088b5e733a3277df5ade5d14d5521 100644 (file)
@@ -131,13 +131,15 @@ static int addstack(char *uname, struct dir *dir, int pidx)
 {
        struct dsitem *ds;
        size_t         l, u;
+    struct dsitem *tmpds = NULL;
 
        /* check if we have some space on stack... */
        if (dsidx >= dssize) {
                dssize += DS_BSIZE;
-               dstack = realloc(dstack, dssize * sizeof(struct dsitem));       
-               if (dstack == NULL)
+               tmpds = realloc(dstack, dssize * sizeof(struct dsitem));        
+               if (tmpds == NULL)
                        return -1;
+        dstack = tmpds;
        }
 
        /* Put new element. Allocate and copy lname and path. */