r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
[samba.git] / source3 / libsmb / clilist.c
index 7822987ada80e21ebfb98c137fd248f3dd5f806d..8ab5854c8fb2ed6769fc99c20b5b80a781e2c278 100644 (file)
@@ -82,7 +82,7 @@ static int interpret_long_filename(struct cli_state *cli,
                        
                case 260: /* NT uses this, but also accepts 2 */
                {
-                       int namelen, slen;
+                       size_t namelen, slen;
                        p += 4; /* next entry offset */
                        p += 4; /* fileindex */
                                
@@ -232,7 +232,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
                        cli_dos_error(cli, &eclass, &ecode);
                        if (eclass != ERRSRV || ecode != ERRerror)
                                break;
-                       msleep(100);
+                       smb_msleep(100);
                        continue;
                }
 
@@ -282,7 +282,7 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
                }
  
                /* and add them to the dirlist pool */
-               tdl = Realloc(dirlist,dirlist_len + data_len);
+               tdl = SMB_REALLOC(dirlist,dirlist_len + data_len);
 
                if (!tdl) {
                        DEBUG(0,("cli_list_new: Failed to expand dirlist\n"));
@@ -413,7 +413,7 @@ int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
 
                first = False;
 
-               tdl = Realloc(dirlist,(num_received + received)*DIR_STRUCT_SIZE);
+               tdl = SMB_REALLOC(dirlist,(num_received + received)*DIR_STRUCT_SIZE);
 
                if (!tdl) {
                        DEBUG(0,("cli_list_old: failed to expand dirlist"));