[ostree] ostree-prepare-root: Don't require an extraneous argument
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] ostree-prepare-root: Don't require an extraneous argument
- Date: Mon, 3 Jun 2013 02:21:21 +0000 (UTC)
commit 35df7a7eb4adbf262444ffc36a8f6253dddd7b2c
Author: Colin Walters <walters verbum org>
Date: Sun Jun 2 22:18:19 2013 -0400
ostree-prepare-root: Don't require an extraneous argument
src/switchroot/ostree-prepare-root.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/switchroot/ostree-prepare-root.c b/src/switchroot/ostree-prepare-root.c
index 65bb730..470ed3c 100644
--- a/src/switchroot/ostree-prepare-root.c
+++ b/src/switchroot/ostree-prepare-root.c
@@ -82,7 +82,7 @@ parse_ostree_cmdline (char **out_osname,
{
const char *next = strchr (iter, ' ');
const char *next_nonspc = next;
- while (*next_nonspc == ' ')
+ while (next_nonspc && *next_nonspc == ' ')
next_nonspc += 1;
if (strncmp (iter, "ostree=", strlen ("ostree=")) == 0)
{
@@ -121,9 +121,9 @@ main(int argc, char *argv[])
size_t len;
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]