Fix some unsigned vs. size_t issues.
authorAndre Noll <maan@systemlinux.org>
Mon, 20 Aug 2007 17:51:18 +0000 (19:51 +0200)
committerAndre Noll <maan@systemlinux.org>
Mon, 20 Aug 2007 17:51:18 +0000 (19:51 +0200)
vss_het_header() took a unsigned while vss_get_chunk() takes
a size_t. Change vss_het_header() and fix up the callers.

dccp_send.c
http_send.c
vss.c
vss.h

index f614271..3d2511f 100644 (file)
@@ -182,7 +182,7 @@ static void dccp_send(long unsigned current_chunk,
        struct dccp_client *dc, *tmp;
        int ret;
        char *header_buf;
-       unsigned header_len;
+       size_t header_len;
 
        if (listen_fd < 0 || !len)
                return;
index bbf6341..e7a9ae2 100644 (file)
@@ -165,11 +165,11 @@ static void http_send( long unsigned current_chunk,
                                hc->status != HTTP_READY_TO_STREAM)
                        continue;
                if (hc->status == HTTP_READY_TO_STREAM) {
-                       unsigned hlen;
+                       size_t hlen;
                        char *hbuf = vss_get_header(&hlen);
                        if (hbuf && hlen > 0 && current_chunk) {
                                /* need to send header */
-                               PARA_INFO_LOG("queueing header: %d\n", hlen);
+                               PARA_INFO_LOG("queueing header: %zu\n", hlen);
                                if (queue_chunk_or_shutdown(hc, -1U, 0) < 0)
                                        continue;
                        } else
diff --git a/vss.c b/vss.c
index a16b006..c15fbd7 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -400,7 +400,7 @@ static void vss_eof(void)
  * treamtment.
  *
  */
-char *vss_get_header(unsigned *header_len)
+char *vss_get_header(size_t *header_len)
 {
        if (mmd->audio_format < 0 || !map || !mmd->afi.header_len)
                return NULL;
diff --git a/vss.h b/vss.h
index bd3b4d7..7d2764d 100644 (file)
--- a/vss.h
+++ b/vss.h
@@ -13,7 +13,7 @@ unsigned int vss_playing(void);
 unsigned int vss_next(void);
 unsigned int vss_repos(void);
 unsigned int vss_paused(void);
-char *vss_get_header(unsigned *header_len);
+char *vss_get_header(size_t *header_len);
 struct timeval *vss_chunk_time(void);
 int guess_audio_format(const char *name);
 const char *supported_audio_formats(void);