summaryrefslogtreecommitdiff
path: root/ttd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-23 10:54:32 +0000
committertron <tron@openttd.org>2005-01-23 10:54:32 +0000
commit9f60324821192b29cd7fa58f3445af0df0a92784 (patch)
treed75cd057462346fd214b27d418876324adc76405 /ttd.c
parentfd25a53d1be1d324fab3fb7c1cd7aba96c1e5f96 (diff)
downloadopenttd-9f60324821192b29cd7fa58f3445af0df0a92784.tar.xz
(svn r1606) Fix some bogus casts
Diffstat (limited to 'ttd.c')
-rw-r--r--ttd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ttd.c b/ttd.c
index 94bb66272..3ab4676a0 100644
--- a/ttd.c
+++ b/ttd.c
@@ -78,7 +78,7 @@ void CDECL debug(const char *s, ...)
vsprintf(buf, s, va);
va_end(va);
fprintf(stderr, "dbg: %s\n", buf);
- IConsoleDebug((byte *) &buf);
+ IConsoleDebug(buf);
}
void CDECL ShowInfoF(const char *str, ...)
@@ -220,7 +220,7 @@ static char *strecpy(char *dst, const char *src)
byte *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize)
{
FILE *in;
- void *mem;
+ byte *mem;
size_t len;
in = fopen(filename, "rb");
@@ -230,11 +230,11 @@ byte *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize)
fseek(in, 0, SEEK_END);
len = ftell(in);
fseek(in, 0, SEEK_SET);
- if (len > maxsize || (mem=(byte*)malloc(len + 1)) == NULL) {
+ if (len > maxsize || (mem = malloc(len + 1)) == NULL) {
fclose(in);
return NULL;
}
- ((byte*)mem)[len] = 0;
+ mem[len] = 0;
if (fread(mem, len, 1, in) != 1) {
fclose(in);
free(mem);