Commit 02cc6c5f authored by Karl Heyes's avatar Karl Heyes

type cleanups. reduces memory usage on 64bit, no difference on 32bit. closes #780

svn path=/icecast/trunk/icecast/; revision=14306
parent 7b6b874b
......@@ -42,7 +42,7 @@ typedef struct _client_tag
refbuf_t *refbuf;
/* position in first buffer */
unsigned long pos;
unsigned int pos;
/* auth used for this client */
struct auth_tag *auth;
......
......@@ -26,7 +26,9 @@
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include <time.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#include "connection.h"
#include "refbuf.h"
......@@ -136,7 +138,7 @@ static int get_file_data (FILE *intro, client_t *client)
if (bytes == 0)
return 0;
refbuf->len = bytes;
refbuf->len = (unsigned int)bytes;
return 1;
}
......
......@@ -236,7 +236,7 @@ static void wait_for_fds(void) {
static void *fserv_thread_function(void *arg)
{
fserve_t *fclient, **trail;
int bytes;
size_t bytes;
INFO0("file serving thread started");
while (run_fserv) {
......@@ -270,7 +270,7 @@ static void *fserv_thread_function(void *arg)
client_tree_changed = 1;
continue;
}
refbuf->len = bytes;
refbuf->len = (unsigned int)bytes;
client->pos = 0;
}
......
......@@ -33,7 +33,7 @@ void refbuf_shutdown(void)
{
}
refbuf_t *refbuf_new(unsigned long size)
refbuf_t *refbuf_new(unsigned int size)
{
refbuf_t *refbuf;
......
......@@ -20,19 +20,19 @@
typedef struct _refbuf_tag
{
unsigned int len;
unsigned int _count;
char *data;
unsigned long len;
int sync_point;
struct _refbuf_tag *associated;
struct _refbuf_tag *next;
int sync_point;
unsigned long _count;
} refbuf_t;
void refbuf_initialize(void);
void refbuf_shutdown(void);
refbuf_t *refbuf_new(unsigned long size);
refbuf_t *refbuf_new(unsigned int size);
void refbuf_addref(refbuf_t *self);
void refbuf_release(refbuf_t *self);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment