pmap: Fixing -n,-N x -p,-q check

The -p,-q switches are mutually exclusive with -n,-N, but
not between each other. This commit changes the expression
to a correct one.
This commit is contained in:
Jaromir Capik 2013-03-19 10:47:36 +01:00
parent 5c513ce582
commit 43bcb47007

2
pmap.c
View File

@ -1078,7 +1078,7 @@ int main(int argc, char **argv)
if (c_option + C_option + d_option + n_option + N_option + x_option + !!X_option > 1)
xerrx(EXIT_FAILURE, _("options -c, -C, -d, -n, -N, -x, -X are mutually exclusive"));
if (n_option + N_option + q_option + map_desc_showpath > 1)
if ((n_option || N_option) && (q_option || map_desc_showpath))
xerrx(EXIT_FAILURE, _("options -p, -q are mutually exclusive with -n, -N"));
if ((n_option || N_option) && argc > 0)