mount: improve code readability
Static analyzers (e.g., Coverity) have a hard time understanding why 'optarg' is tested for NULL, and later in another place, code assumes that it's non-NULL. For idmapping, the optarg is required. Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
a5e0e06cc2
commit
a5eba5046d
1 changed files with 1 additions and 1 deletions
|
@ -863,7 +863,7 @@ int main(int argc, char **argv)
|
|||
break;
|
||||
case MOUNT_OPT_MAP_GROUPS:
|
||||
case MOUNT_OPT_MAP_USERS:
|
||||
if (optarg && *optarg == '=')
|
||||
if (*optarg == '=')
|
||||
optarg++;
|
||||
if (idmap && (*idmap == '/' || *optarg == '/')) {
|
||||
warnx(_("bad usage"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue