Changeset 36486be for util.c


Ignore:
Timestamp:
Aug 22, 2009, 12:50:08 AM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
24ccc01
Parents:
303a9e1
git-author:
Anders Kaseorg <andersk@mit.edu> (08/22/09 00:47:21)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/22/09 00:50:08)
Message:
Replace several owl_malloc, sprintf sequences with owl_strdup or owl_sprintf.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    r4083c49 r36486be  
    147147    } else {
    148148      args=owl_realloc(args, sizeof(char *) * (count+1));
    149       args[count]=owl_malloc(strlen(foo)+1);
    150       strcpy(args[count], foo);
     149      args[count] = owl_strdup(foo);
    151150      count++;
    152151    }
     
    325324      /* add the argument */
    326325      argv=owl_realloc(argv, sizeof(char *)*((*argc)+1));
    327       argv[*argc]=owl_malloc(strlen(curarg)+2);
    328       strcpy(argv[*argc], curarg);
     326      argv[*argc] = owl_strdup(curarg);
    329327      *argc=*argc+1;
    330328      strcpy(curarg, "");
Note: See TracChangeset for help on using the changeset viewer.