[ostree] ostree-init: Also trim trailing newline from arguments
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] ostree-init: Also trim trailing newline from arguments
- Date: Mon, 21 Nov 2011 01:56:10 +0000 (UTC)
commit fb98d0bf24b38919c422fece0bdb6de53c77c571
Author: Colin Walters <walters verbum org>
Date: Sun Nov 20 20:49:45 2011 -0500
ostree-init: Also trim trailing newline from arguments
Otherwise the parsed argument is corrupted.
.../yocto/recipies-core/ostree-init/ostree-init.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnomeos/yocto/recipies-core/ostree-init/ostree-init.c b/gnomeos/yocto/recipies-core/ostree-init/ostree-init.c
index 952f8ea..63452f4 100644
--- a/gnomeos/yocto/recipies-core/ostree-init/ostree-init.c
+++ b/gnomeos/yocto/recipies-core/ostree-init/ostree-init.c
@@ -79,6 +79,9 @@ parse_arg (const char *cmdline, const char *arg)
const char *start = p + arglen;
const char *end = strchr (start, ' ');
+ if (!end)
+ end = strchr (start, '\n');
+
if (is_eq)
{
if (end)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]