Ignore:
Timestamp:
Mar 22, 2008, 11:03:33 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • Use strdup(foo) everywhere instead of strcpy(malloc(strlen(foo)+1),foo);
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/dev.cpp

    r129 r131  
    1111
    1212#include <ctype.h>
     13#include <string.h>
    1314
    1415#include "dev.hpp"
     
    29262927  Cell *ao=(Cell *)args;
    29272928
    2928   name=strcpy((char *)malloc(strlen(lstring_value(CAR(args)))+1),lstring_value(CAR(args)));
     2929  name = strdup(lstring_value(CAR(args)));
    29292930  ao=CDR(ao);
    29302931  scale=w=h=1;
Note: See TracChangeset for help on using the changeset viewer.