ostree-prepare-root: Don't require an extraneous argument

This commit is contained in:
Colin Walters 2013-06-02 22:18:19 -04:00
parent 8eaaea795c
commit 35df7a7eb4
1 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ parse_ostree_cmdline (char **out_osname,
{ {
const char *next = strchr (iter, ' '); const char *next = strchr (iter, ' ');
const char *next_nonspc = next; const char *next_nonspc = next;
while (*next_nonspc == ' ') while (next_nonspc && *next_nonspc == ' ')
next_nonspc += 1; next_nonspc += 1;
if (strncmp (iter, "ostree=", strlen ("ostree=")) == 0) if (strncmp (iter, "ostree=", strlen ("ostree=")) == 0)
{ {
@ -121,9 +121,9 @@ main(int argc, char *argv[])
size_t len; size_t len;
int i; int i;
if (argc < 3) if (argc < 2)
{ {
fprintf (stderr, "usage: ostree-prepare-root SYSROOT OSTREE\n"); fprintf (stderr, "usage: ostree-prepare-root SYSROOT\n");
exit (1); exit (1);
} }