mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
make Qwrite's buffer pointer const.
This commit is contained in:
parent
f3ab764666
commit
d6f82b6370
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ VFile *Qopen(const char *path, const char *mode);
|
|||
VFile *Qdopen(int fd, const char *mode);
|
||||
void Qclose(VFile *file);
|
||||
int Qread(VFile *file, void *buf, int count);
|
||||
int Qwrite(VFile *file, void *buf, int count);
|
||||
int Qwrite(VFile *file, const void *buf, int count);
|
||||
int Qprintf(VFile *file, const char *fmt, ...) __attribute__((format(printf,2,3)));
|
||||
char *Qgets(VFile *file, char *buf, int count);
|
||||
int Qgetc(VFile *file);
|
||||
|
|
|
@ -241,13 +241,13 @@ Qread (VFile *file, void *buf, int count)
|
|||
}
|
||||
|
||||
int
|
||||
Qwrite (VFile *file, void *buf, int count)
|
||||
Qwrite (VFile *file, const void *buf, int count)
|
||||
{
|
||||
if (file->file)
|
||||
return fwrite (buf, 1, count, file->file);
|
||||
#ifdef HAVE_ZLIB
|
||||
else
|
||||
return gzwrite (file->gzfile, buf, count);
|
||||
return gzwrite (file->gzfile, (const voidp)buf, count);
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue