aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-05-08 04:51:50 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-05-08 04:51:50 +0000
commit5643bb97e425399371568fb86a817b191eb61dca (patch)
tree17ee3cd9f0a45ea33f4111bcfa0387ac7084f2a5 /gcc/java
parent6706f1167e292fb47d321633a877dcf503a23f30 (diff)
downloadgcc-5643bb97e425399371568fb86a817b191eb61dca.zip
gcc-5643bb97e425399371568fb86a817b191eb61dca.tar.gz
gcc-5643bb97e425399371568fb86a817b191eb61dca.tar.bz2
* gjavah.c (throwable_p): Use xstrdup, not strdup.
From-SVN: r53279
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog2
-rw-r--r--gcc/java/gjavah.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index a8f7f20..703658d 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,7 @@
2002-05-07 Tom Tromey <tromey@redhat.com>
+ * gjavah.c (throwable_p): Use xstrdup, not strdup.
+
Fix for PR java/1200:
* gjavah.c (throwable_p): New function.
(decode_signature_piece): Use it. A `WeakReference' isn't the
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index d152b37..f4f2c2b 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -1137,11 +1137,11 @@ throwable_p (signature)
(htab_del) free);
/* Make sure the root classes show up in the tables. */
- str = strdup ("java.lang.Throwable");
+ str = xstrdup ("java.lang.Throwable");
slot = htab_find_slot (throw_hash, str, INSERT);
*slot = (PTR) str;
- str = strdup ("java.lang.Object");
+ str = xstrdup ("java.lang.Object");
slot = htab_find_slot (non_throw_hash, str, INSERT);
*slot = (PTR) str;