]> arthur.barton.de Git - netatalk.git/commitdiff
gcc warnings and rsize use befor init.
authordidg <didg>
Mon, 2 May 2005 16:34:23 +0000 (16:34 +0000)
committerdidg <didg>
Mon, 2 May 2005 16:34:23 +0000 (16:34 +0000)
etc/afpd/catsearch.c

index 3d95d14b5414f6c8bfd45cdbb51d8805a9085144..96e3124eb88805d6912aa440f149d2d8190c48fd 100644 (file)
@@ -117,7 +117,7 @@ struct dsitem {
  
 
 #define DS_BSIZE 128
-static int cur_pos = 0;    /* Saved position index (ID) - used to remember "position" across FPCatSearch calls */
+static u_int32_t cur_pos = 0;    /* Saved position index (ID) - used to remember "position" across FPCatSearch calls */
 static DIR *dirpos = NULL; /* UNIX structure describing currently opened directory. */
 static int save_cidx = -1; /* Saved index of currently scanned directory. */
 
@@ -484,7 +484,7 @@ static int rslt_add ( struct vol *vol, struct path *path, char **buf, int ext)
  */
 #define NUM_ROUNDS 100
 static int catsearch(struct vol *vol, struct dir *dir,  
-                    int rmatches, int *pos, char *rbuf, u_int32_t *nrecs, int *rsize, int ext)
+                    int rmatches, u_int32_t *pos, char *rbuf, u_int32_t *nrecs, int *rsize, int ext)
 {
        int cidx, r;
        struct dirent *entry;
@@ -499,8 +499,10 @@ static int catsearch(struct vol *vol, struct dir *dir,
     int num_rounds = NUM_ROUNDS;
     int cached;
         
-       if (*pos != 0 && *pos != cur_pos) 
-               return AFPERR_CATCHNG;
+       if (*pos != 0 && *pos != cur_pos) {
+               result = AFPERR_CATCHNG;
+               goto catsearch_end;
+       }
 
        /* FIXME: Category "offspring count ! */