[SSSD] [PATCH] IFP: Suppress warning from static analyzer

Jakub Hrozek jhrozek at redhat.com
Wed Sep 23 19:18:29 UTC 2015


On Wed, Sep 23, 2015 at 09:00:04PM +0200, Pavel Březina wrote:
> On 09/23/2015 01:29 PM, Lukas Slebodnik wrote:
> >ehlo,
> >
> >simple patch is attached.
> >
> >LS
> 
> >-    if (errno != 0) {
> >-        ret = errno;
> >+    ret = errno;
> >+    if (ret != 0) {
> >         goto done;
> >     }
> 
> Hi,
> if we are checking ret, it may be nicer to test against EOK since that is
> what we usually do with this name.

We might even go one step further (in master, when we release 1.13.1)
and just convert the function to return a result and error code
separately:
    ret = strtouint32(val, &ret);


More information about the sssd-devel mailing list