From f90b720ba1b70759feea3b3a130a6f8b01709d68 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 30 Aug 1997 00:02:19 +0000 Subject: Passify GCC. Convert 0x0LL to something more portable in the FP code. --- sim/common/sim-utils.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'sim/common/sim-utils.c') diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c index b62317ce..9bcfffc 100644 --- a/sim/common/sim-utils.c +++ b/sim/common/sim-utils.c @@ -110,43 +110,6 @@ sim_add_commas (char *buf, int sizeof_buf, unsigned long value) return endbuf; } -/* Make a copy of ARGV. - This can also be used to copy the environment vector. - The result is a pointer to the malloc'd copy or NULL if insufficient - memory available. */ - -char ** -sim_copy_argv (argv) - char **argv; -{ - int argc; - char **copy; - - if (argv == NULL) - return NULL; - - /* the vector */ - for (argc = 0; argv[argc] != NULL; argc++); - copy = (char **) malloc ((argc + 1) * sizeof (char *)); - if (copy == NULL) - return NULL; - - /* the strings */ - for (argc = 0; argv[argc] != NULL; argc++) - { - int len = strlen (argv[argc]); - copy[argc] = malloc (sizeof (char *) * (len + 1)); - if (copy[argc] == NULL) - { - freeargv (copy); - return NULL; - } - strcpy (copy[argc], argv[argc]); - } - copy[argc] = NULL; - return copy; -} - /* Analyze a prog_name/prog_bfd and set various fields in the state struct. */ -- cgit v1.1