#27 src/updatedb.c:960: possible bad mask ?
Closed: Fixed Opened by dcb.

I just ran the static analysis tool "cppcheck" over
the source code of mlocate-0.26. It said

[src/updatedb.c:960] -> [src/updatedb.c:960]: (style) Same expression on both sides of '|'.

Source code is

  mask = umask (S_IRWXU | S_IRWXG | S_IRWXG);

Maybe

  mask = umask (S_IRWXU | S_IRWXG | S_IRWXO);

was intended ?


Thanks for the report.

You're right; this should have been S_IRWXO. (It doesn't make a functional difference because the umask is immediately reset to the original value.)

Fixed in commit [3bed9dd01e59].

Metadata