> -----Original Message-----
> From: Richard Cochran [mailto:richardcoch...@gmail.com]
> Sent: Wednesday, July 19, 2017 9:53 PM
> To: Keller, Jacob E <jacob.e.kel...@intel.com>
> Cc: Hangbin Liu <liuhang...@gmail.com>; Sushil Kulkarni
> <sukul...@redhat.com>; linuxptp-devel@lists.sourceforge.net; Jiri Benc
> <jb...@redhat.com>
> Subject: Re: [Linuxptp-devel] [PATCHv2 4/9] rtnl: add function rtnl_link_info
> 
> On Wed, Jul 19, 2017 at 08:47:43PM +0000, Keller, Jacob E wrote:
> > if (rtnl_link_query(fd, index))
> >     err = -1;
> > else if (rtnl_link_status(fd, NULL, iface->ts_iface))
> >     err = -1;
> 
> This is poor practice, because you clobber the code returned from
> the sub-routine that experienced the error.
> 
> Thanks,
> Richard

Correct. I like your proposed solution better. I was merely re-writing to show 
how the logic flow would work, and preserved the return code the original code 
had.

Thanks,
Jake
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to