OSDN Git Service

Fix compile time warning.
authorXin Li <delphij@google.com>
Wed, 9 Jan 2019 23:15:15 +0000 (15:15 -0800)
committerXin Li <delphij@google.com>
Wed, 9 Jan 2019 23:26:13 +0000 (23:26 +0000)
commit3a039ff76350811822b3ab885c64c683016da879
tree22ebc7992857e175b3bfd6f29704a2bb327b6f53
parentdcfef16295126c0197e5e1f6449280efdf787fea
Fix compile time warning.

In checkIncidentPermissions(), the intention of code is to bail out when
the caller do not have appropriate permission.

Logically, DEST_LOCAL and DEST_EXPLICIT should be checked separately.
In the current code, we would fall-through to DEST_EXPLICIT case, but
because permitted DEST_LOCAL callers (AID_SHELL and AID_ROOT) are also
permitted DEST_EXPLICIT callers, we will still get the Status:ok().

Test: build
Change-Id: I0f6121cb1aba7724306b99469f5ef97b4358ac7d
cmds/incidentd/src/IncidentService.cpp