diff options
author | iverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 22:06:15 +0000 |
---|---|---|
committer | iverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-11-13 22:06:15 +0000 |
commit | 44ee4fad4bd532743c3b919d05988831f47f62db (patch) | |
tree | 500d5852d5d9e50af0387d7edfae44eaec850108 /gcc/lto-wrapper.c | |
parent | f7a36cb0e1e95e654581955cc33fbd0538fe9fb0 (diff) | |
download | gcc-44ee4fad4bd532743c3b919d05988831f47f62db.tar.gz |
2014-11-13 Dominique Dhumieres <dominiq@lps.ens.fr>
PR bootstrap/63853
gcc/
* gcc.c (handle_foffload_option): Replace strchrnul with strchr.
* lto-wrapper.c (parse_env_var, append_offload_options): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217524 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r-- | gcc/lto-wrapper.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index de73ebcdb8b..951a2ddc787 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -424,7 +424,9 @@ parse_env_var (const char *str, char ***pvalues, const char *append) values = (char**) xmalloc (num * sizeof (char*)); curval = str; - nextval = strchrnul (curval, ':'); + nextval = strchr (curval, ':'); + if (nextval == NULL) + nextval = strchr (curval, '\0'); int append_len = append ? strlen (append) : 0; for (i = 0; i < num; i++) @@ -436,7 +438,9 @@ parse_env_var (const char *str, char ***pvalues, const char *append) if (append) strcat (values[i], append); curval = nextval + 1; - nextval = strchrnul (curval, ':'); + nextval = strchr (curval, ':'); + if (nextval == NULL) + nextval = strchr (curval, '\0'); } *pvalues = values; return num; @@ -581,7 +585,9 @@ append_offload_options (obstack *argv_obstack, const char *target, while (cur < opts) { - next = strchrnul (cur, ','); + next = strchr (cur, ','); + if (next == NULL) + next = strchr (cur, '\0'); next = (next > opts) ? opts : next; if (strlen (target) == (size_t) (next - cur) |