Does anything look wrong in this function?

Richard Sharpe realrichardsharpe at gmail.com
Thu Mar 24 02:40:18 UTC 2016


On Wed, Mar 23, 2016 at 7:38 PM, Ira Cooper <ira at wakeful.net> wrote:
> I found 1... Is there more to find ;).
>
>         if (ret == -1) {
>                 map_nt_error_from_unix(errno);
>         }
>
> Clearly wants a return in front.
>
> If I found it, confirm to the list, if not, deny to me... wouldn't want to
> deny others the fun.

You got it ... first.

> -Ira
>
> On Wed, Mar 23, 2016 at 10:23 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>>
>> Saw this while working on my DOS ATTRIBUTES stuff:
>>
>> NTSTATUS set_create_timespec_ea(connection_struct *conn,
>>                                 const struct smb_filename *psmb_fname,
>>                                 struct timespec create_time)
>> {
>>         struct smb_filename *smb_fname;
>>         uint32_t dosmode;
>>         int ret;
>>
>>         if (!lp_store_dos_attributes(SNUM(conn))) {
>>                 return NT_STATUS_OK;
>>         }
>>
>>         smb_fname = synthetic_smb_fname(talloc_tos(),
>> psmb_fname->base_name,
>>                                         NULL, &psmb_fname->st);
>>
>>         if (smb_fname == NULL) {
>>                 return NT_STATUS_NO_MEMORY;
>>         }
>>
>>         dosmode = dos_mode(conn, smb_fname);
>>
>>         smb_fname->st.st_ex_btime = create_time;
>>
>>         ret = file_set_dosmode(conn, smb_fname, dosmode, NULL, false);
>>         if (ret == -1) {
>>                 map_nt_error_from_unix(errno);
>>         }
>>
>>         DEBUG(10,("set_create_timespec_ea: wrote create time EA for file
>> %s\n",
>>                 smb_fname_str_dbg(smb_fname)));
>>
>>         return NT_STATUS_OK;
>> }
>>
>> --
>> Regards,
>> Richard Sharpe
>> (何以解憂?唯有杜康。--曹操)
>>
>



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list