1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)

This commit is contained in:
rubidium
2014-04-25 15:40:32 +00:00
parent 4227f495c5
commit 9ed12b0f07
70 changed files with 207 additions and 183 deletions

View File

@@ -12,6 +12,7 @@
#include "stdafx.h"
#include "base_consist.h"
#include "vehicle_base.h"
#include "string_func.h"
#include "safeguards.h"
@@ -29,7 +30,7 @@ void BaseConsist::CopyConsistPropertiesFrom(const BaseConsist *src)
if (this == src) return;
free(this->name);
this->name = src->name != NULL ? strdup(src->name) : NULL;
this->name = src->name != NULL ? stredup(src->name) : NULL;
this->current_order_time = src->current_order_time;
this->lateness_counter = src->lateness_counter;