summaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
diff options
context:
space:
mode:
authorIlya Tocar <ilya.tocar@intel.com>2014-11-25 13:56:03 +0000
committerIlya Tocar <tocarip@gcc.gnu.org>2014-11-25 16:56:03 +0300
commit191ec64036b11c0b56aa0d2a387e936286103d2e (patch)
tree9ecd455af2d5a192d1d2e62f558b237a9f88e62d /gcc/lto-wrapper.c
parenta959b33fc4a5b4dffc55d5c7f105dc1096a75b42 (diff)
downloadgcc-191ec64036b11c0b56aa0d2a387e936286103d2e.tar.gz
Remove unnecessary calls to strchr.
gcc/ * gcc.c (handle_foffload_option): Remove unnecessary calls to strchr, strlen, strncpy. * lto-wrapper.c (append_offload_options): Likewise. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r218044
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r--gcc/lto-wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 6b417821295..9a540b4ede5 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -587,7 +587,7 @@ append_offload_options (obstack *argv_obstack, const char *target,
{
next = strchr (cur, ',');
if (next == NULL)
- next = strchr (cur, '\0');
+ next = opts;
next = (next > opts) ? opts : next;
if (strlen (target) == (size_t) (next - cur)