What's wrong with this piece of code from source3/modules/vfs_acl_xattr.c around like 126 or so?

simo idra at samba.org
Mon May 14 18:47:44 MDT 2012


On Mon, 2012-05-14 at 16:25 -0700, Jeremy Allison wrote: 
> On Mon, May 14, 2012 at 02:28:59PM -0700, Richard Sharpe wrote:
> >         if (ret) {
> >                 errno = saved_errno;
> >                 DEBUG(5, ("store_acl_blob_fsp: setting attr failed for file %s"
> >                         "with error %s\n",
> >                         fsp_str_dbg(fsp),
> >                         strerror(errno) ));
> >                 return map_nt_error_from_unix(errno);
> >         }
> > 
> > Hint. It has to do with saved_errno.
> 
> Oh, you mean the errno = saved_errno should
> be *after* the DEBUG statement ?
> 
> Just checking - not sure exactly what I missed here.

Why are you assigning errno, and not just using saved_errno directly ?

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the samba-technical mailing list