mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
type cleanups. reduces memory usage on 64bit, no difference on 32bit. closes #780
svn path=/icecast/trunk/icecast/; revision=14306
This commit is contained in:
parent
7b6b874b02
commit
02cc6c5f10
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user