diff options
author | Jeremy Allison <jra@samba.org> | 2005-03-22 22:04:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:14 -0500 |
commit | 656140bf4b0c62e1bfdb4ea59db15808ae25edec (patch) | |
tree | 19a6408e78fde4d48691220f3b403d6ce5466912 /source3 | |
parent | 47f58beb282bcc80993329a1cf3e7002141ab8fb (diff) | |
download | samba-656140bf4b0c62e1bfdb4ea59db15808ae25edec.tar.gz samba-656140bf4b0c62e1bfdb4ea59db15808ae25edec.tar.xz samba-656140bf4b0c62e1bfdb4ea59db15808ae25edec.zip |
r5975: Re-arrange code and comments to make more sense.
Jeremy.
(This used to be commit 08616ad80d96d1b7b558eec036bafb4bf3663942)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clilist.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index 33bf32bb94f..eea4391e55b 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -270,18 +270,6 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, p = rdata; /* we might need the lastname for continuations */ - - /* and add them to the dirlist pool */ - tdl = SMB_REALLOC(dirlist,dirlist_len + data_len); - - if (!tdl) { - DEBUG(0,("cli_list_new: Failed to expand dirlist\n")); - break; - } else { - dirlist = tdl; - } - - /* we might need the lastname for continuations */ for (p2=p,i=0;i<ff_searchcount;i++) { p2 += interpret_long_filename(cli,info_level,p2,&finfo); } @@ -293,6 +281,16 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute, } /* grab the data for later use */ + /* and add them to the dirlist pool */ + tdl = SMB_REALLOC(dirlist,dirlist_len + data_len); + + if (!tdl) { + DEBUG(0,("cli_list_new: Failed to expand dirlist\n")); + break; + } else { + dirlist = tdl; + } + memcpy(dirlist+dirlist_len,p,data_len); dirlist_len += data_len; |