aboutsummaryrefslogtreecommitdiffstats
path: root/misc/chattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/chattr.c')
-rw-r--r--misc/chattr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/chattr.c b/misc/chattr.c
index a90bdf4d..b359248a 100644
--- a/misc/chattr.c
+++ b/misc/chattr.c
@@ -114,9 +114,9 @@ static int decode_arg (int * i, int argc, char ** argv)
rem = 1;
break;
case 'v':
+ (*i)++;
if (*i >= argc)
usage ();
- (*i)++;
version = strtol (argv[*i], &tmp, 0);
if (*tmp)
{
@@ -310,9 +310,9 @@ void main (int argc, char ** argv)
fprintf (stderr, "= is incompatible with - and +\n");
exit (1);
}
- if (!(add || rem || set))
+ if (!(add || rem || set || set_version))
{
- fprintf (stderr, "Must use =, - or +\n");
+ fprintf (stderr, "Must use '-v', =, - or +\n");
exit (1);
}
for (j = i; j < argc; j++)