Ignore:
Timestamp:
Mar 22, 2008, 11:03:33 AM (13 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/sdlport/sound.cpp

    r129 r131  
    1919
    2020#include "config.h"
     21
     22#include <string.h>
    2123
    2224#include <SDL.h>
     
    295297{
    296298    data = NULL;
    297     Name = strcpy((char *)malloc( strlen( filename ) + 1 ), filename );
     299    Name = strdup(filename);
    298300    song_id = 0;
    299301}
Note: See TracChangeset for help on using the changeset viewer.