}
/* Removes checked items from top of directory stack. Returns index of the first unchecked elements or -1. */
-static int reducestack()
+static int reducestack(void)
{
int r;
if (save_cidx != -1) {
}
/* Clears directory stack. */
-static void clearstack()
+static void clearstack(void)
{
save_cidx = -1;
while (dsidx > 0) {
{
char *p = *buf;
- int ret, tbuf =0;
+ int ret;
+ size_t tbuf =0;
u_int16_t resultsize;
int isdir = S_ISDIR(path->st.st_mode);
} /* catsearch() */
/* -------------------------- */
-int catsearch_afp(AFPObj *obj _U_, char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen, int ext)
+static int catsearch_afp(AFPObj *obj _U_, char *ibuf, size_t ibuflen,
+ char *rbuf, size_t *rbuflen, int ext)
{
struct vol *vol;
u_int16_t vid;
}
/* Parse file specifications */
- spec1 = ibuf;
- spec2 = ibuf + spec_len + 2;
+ spec1 = (unsigned char*)ibuf;
+ spec2 = (unsigned char*)ibuf + spec_len + 2;
spec1 += 2;
spec2 += 2;
} /* catsearch_afp */
/* -------------------------- */
-int afp_catsearch (AFPObj *obj, char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen)
+int afp_catsearch (AFPObj *obj, char *ibuf, size_t ibuflen,
+ char *rbuf, size_t *rbuflen)
{
return catsearch_afp( obj, ibuf, ibuflen, rbuf, rbuflen, 0);
}
-int afp_catsearch_ext (AFPObj *obj, char *ibuf, int ibuflen,
- char *rbuf, int *rbuflen)
+int afp_catsearch_ext (AFPObj *obj, char *ibuf, size_t ibuflen,
+ char *rbuf, size_t *rbuflen)
{
return catsearch_afp( obj, ibuf, ibuflen, rbuf, rbuflen, 1);
}