On 12/21/2012 09:47 PM, Alice Chu wrote:
Hello,
This is for external/libselinux.
Klocwork complains android.c line 734 mkdir() return value not being checked.
Attached is the fix.
Please review and thanks for the feedback.
First, the original code would have eventually caught and handled the
failed mkdir because the mount would fail due to a missing mount point
directory. So it isn't clear that this requires any fix unless you care
about the specific error message spelling out the fact that it was the
prior mkdir that failed.
Second, the patch yields an undesirable behavior if the mkdir fails due
to the mount point directory already existing i.e. errno == EEXIST. In
that situation, we still want to perform the mount rather than failing.
So you can either drop the patch altogether, or you can adapt it to
perform the mount if the mkdir succeeds or errno == EEXIST.
--
This message was distributed to subscribers of the seandroid-list mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe seandroid-list" without quotes as the message.