diff options
author | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
commit | 33be1ecfb1a9056b027d50d7b558cff87c5b744d (patch) | |
tree | d644a3831ca0947198b191fa3e4e8973d3a9786e /src/newgrf_gui.cpp | |
parent | 91ff74641060445dc1647bbf05baeb03b45c3099 (diff) | |
download | openttd-33be1ecfb1a9056b027d50d7b558cff87c5b744d.tar.xz |
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r-- | src/newgrf_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 7eb63d722..d5934a433 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -154,7 +154,7 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e) case 6: /* Add selection to list */ if (WP(w, newgrf_add_d).sel != NULL) { const GRFConfig *src = WP(w, newgrf_add_d).sel; - GRFConfig **list, *c; + GRFConfig **list; /* Find last entry in the list, checking for duplicate grfid on the way */ for (list = WP(w, newgrf_add_d).list; *list != NULL; list = &(*list)->next) { @@ -165,7 +165,7 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e) } /* Copy GRF details from scanned list */ - CallocT(&c, 1); + GRFConfig *c = CallocT<GRFConfig>(1); *c = *src; c->filename = strdup(src->filename); if (src->name != NULL) c->name = strdup(src->name); |