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/gcc.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/gcc.c')
-rw-r--r-- | gcc/gcc.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index 4422fa038e8..653ca8db9f6 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3375,12 +3375,16 @@ handle_foffload_option (const char *arg) if (arg[0] == '-') return; - end = strchrnul (arg, '='); + end = strchr (arg, '='); + if (end == NULL) + end = strchr (arg, '\0'); cur = arg; while (cur < end) { - next = strchrnul (cur, ','); + next = strchr (cur, ','); + if (next == NULL) + next = strchr (cur, '\0'); next = (next > end) ? end : next; target = XNEWVEC (char, next - cur + 1); @@ -3400,7 +3404,9 @@ handle_foffload_option (const char *arg) c = OFFLOAD_TARGETS; while (c) { - n = strchrnul (c, ','); + n = strchr (c, ','); + if (n == NULL) + n = strchr (c, '\0'); if (strlen (target) == (size_t) (n - c) && strncmp (target, c, n - c) == 0) @@ -3421,7 +3427,9 @@ handle_foffload_option (const char *arg) c = offload_targets; do { - n = strchrnul (c, ':'); + n = strchr (c, ':'); + if (n == NULL) + n = strchr (c, '\0'); if (strlen (target) == (size_t) (n - c) && strncmp (c, target, n - c) == 0) |