Bug 71257 - adcli-0.7.5/library/adutil.c:330: possible bad if test ?
Summary: adcli-0.7.5/library/adutil.c:330: possible bad if test ?
Status: RESOLVED FIXED
Alias: None
Product: realmd
Classification: Unclassified
Component: adcli (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 11:57 UTC by dcb314
Modified: 2016-04-14 08:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
library: Fix check for EAGAIN or EINTR (714 bytes, patch)
2016-04-14 08:00 UTC, Stef Walter
Details | Splinter Review

Description dcb314 2013-11-05 11:57:32 UTC
Source code is

            if (errno == EAGAIN && errno == EINTR)

Suggest swap && for ||. I found this bug by using the gcc compiler
flag -Wlogical-op. It might be a good idea to start using this
compiler flag on development builds.
Comment 1 Stef Walter 2016-04-14 08:00:36 UTC
Created attachment 122928 [details] [review]
library: Fix check for EAGAIN or EINTR
Comment 2 Stef Walter 2016-04-14 08:01:06 UTC
Thanks for reporting the bug. Pushed a fix to git master.

Attachment 122928 [details] pushed as 836dcc4 - library: Fix check for EAGAIN or EINTR


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.