[pacman-dev] [PATCH 2/2] Fix some warning that cppcheck gave back

Dan McGee dpmcgee at gmail.com
Sun Oct 25 22:46:48 EDT 2009


On Sun, Oct 25, 2009 at 5:33 AM, Laszlo Papp <djszapi2 at gmail.com> wrote:
> opendir(path)) == (DIR *)-1 is maybe the result of miss understanding of the man
> page, if the opendir wasn't successful it gives back NULL instead of '(DIR *)-1'.
>
> The ambiguity while cycle with EINTR condition was refactored for a do {} while ()
> cycle to be easier to read/understand
>
> The 'errno == EINTR' condition examinations were changed for 'pm_errno == EINTR'
> in the api, in trans.c and util.c, where the do {} while {} changings happened too.

What the heck? Do you understand C and the standard API or are you
just doing blind "make it look good" patches?

the open() *system* function will never ever EVER set pm_errno. I'm so
confused what you are trying to do there...

-Dan


More information about the pacman-dev mailing list