summaryrefslogtreecommitdiff
path: root/sim/ppc/psim.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-06-09 14:21:43 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-06-09 14:21:43 +0000
commit94e4274dc0e36cc3c3927e09f7e8ca41b39a8dd7 (patch)
tree7b47d718c7ea0009cdccadedadef2b99ddc72c15 /sim/ppc/psim.c
parent807b48afa090466f63ed75e4af9b5eaabd338a66 (diff)
downloadbinutils-gdb-94e4274dc0e36cc3c3927e09f7e8ca41b39a8dd7.tar.gz
sim/ppc: Fix check for --sysroot= option
Fixes an error reported by Tristan and which can be evidenced by doing: % powerpc-elf-gdb (gdb) target sim --sysroot=var Invalid option: --sysroot=/var [...] sim/ppc/ChangeLog: * psim.c (psim_options): Fix length of comparison when checking for --sysroot= option.
Diffstat (limited to 'sim/ppc/psim.c')
-rw-r--r--sim/ppc/psim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index d814486be33..3e7638690a1 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -359,7 +359,7 @@ psim_options(device *root,
else if (strcmp (argv[argp], "--help") == 0)
psim_usage (0, 1);
else if (strncmp (argv[argp], "--sysroot=",
- sizeof ("--sysroot=")) == 0)
+ sizeof ("--sysroot=") - 1) == 0)
/* Ignore this option. */
p = argv[argp] + strlen(argv[argp]) - 1;
else if (strcmp (argv[argp], "--version") == 0)