diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1999-09-16 15:45:15 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1999-09-16 15:45:15 +0000 |
commit | c2e3db9254f058830d2ef7106d74d20a7fa56c75 (patch) | |
tree | 16053d5d21a42fd79947636788b0a774368e0381 /gcc/java/jcf-io.c | |
parent | 7ca3e7133c3d125d31155affbddfb40ea29a0b9d (diff) | |
download | gcc-c2e3db9254f058830d2ef7106d74d20a7fa56c75.zip gcc-c2e3db9254f058830d2ef7106d74d20a7fa56c75.tar.gz gcc-c2e3db9254f058830d2ef7106d74d20a7fa56c75.tar.bz2 |
gjavah.c (get_field_name, [...]): Use xmalloc, not malloc.
* gjavah.c (get_field_name, print_method_info, print_include,
add_namelet): Use xmalloc, not malloc.
* jcf-depend.c (add_entry): Likewise. Use xstrdup, not strdup.
(munge): Use xrealloc, not realloc, trust xrealloc to handle a
NULL pointer.
* jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
* jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
* jcf-path.c (add_entry): Likewise.
* jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
* jv-scan.c (xmalloc): Remove definition.
* jvgenmain.c (xmalloc): Likewise.
* jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
* lex.c (java_store_unicode): Use xrealloc, not realloc.
* parse-scan.y: Use concat, not of xmalloc/assign/strcpy. Use
concat, not xmalloc/sprintf.
(java_push_parser_context): Use xcalloc, not xmalloc/bzero.
(xstrdup): Remove definition.
* parse.y (duplicate_declaration_error_p,
constructor_circularity_msg, verify_constructor_circularity,
check_abstract_method_definitions, java_check_regular_methods,
java_check_abstract_methods, patch_method_invocation,
check_for_static_method_reference, patch_assignment, patch_binop,
patch_cast, array_constructor_check_entry, patch_return,
patch_conditional_expr): Use xstrdup, not strdup.
* zextract.c (ALLOC): Use xmalloc, not malloc.
From-SVN: r29457
Diffstat (limited to 'gcc/java/jcf-io.c')
-rw-r--r-- | gcc/java/jcf-io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c index 765f150..2d43a51 100644 --- a/gcc/java/jcf-io.c +++ b/gcc/java/jcf-io.c @@ -169,8 +169,8 @@ DEFUN(open_in_zip, (jcf, zipfile, zipmember, is_system), jcf->read_ptr = jcf->buffer; jcf->read_end = jcf->buffer_end; jcf->filbuf = jcf_unexpected_eof; - jcf->filename = strdup (zipfile); - jcf->classname = strdup (zipmember); + jcf->filename = xstrdup (zipfile); + jcf->classname = xstrdup (zipmember); jcf->zipd = (void *)zipd; if (lseek (zipf->fd, zipd->filestart, 0) < 0 || read (zipf->fd, jcf->buffer, zipd->size) != zipd->size) @@ -414,14 +414,14 @@ DEFUN(find_class, (classname, classname_length, jcf, source_ok), { JCF_ZERO (jcf); /* JCF_FINISH relies on this */ jcf->java_source = 1; - jcf->filename = (char *) strdup (buffer); + jcf->filename = xstrdup (buffer); close (fd); /* We use STDIO for source file */ } else buffer = open_class (buffer, jcf, fd, dep_file); jcf->classname = (char *) ALLOC (classname_length + 1); strncpy (jcf->classname, classname, classname_length + 1); - jcf->classname = (char *) strdup (classname); + jcf->classname = xstrdup (classname); return buffer; #endif } |