From 0869d99a5dcfa351536a129f10ddf3a99211cf46 Mon Sep 17 00:00:00 2001
From: Andre Noll <maan@systemlinux.org>
Date: Mon, 20 Aug 2007 19:51:18 +0200
Subject: [PATCH] Fix some unsigned vs. size_t issues.

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 | 2 +-
 http_send.c | 4 ++--
 vss.c       | 2 +-
 vss.h       | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dccp_send.c b/dccp_send.c
index f6142716..3d2511f7 100644
--- a/dccp_send.c
+++ b/dccp_send.c
@@ -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;
diff --git a/http_send.c b/http_send.c
index bbf63410..e7a9ae2b 100644
--- a/http_send.c
+++ b/http_send.c
@@ -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 a16b006f..c15fbd7e 100644
--- 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 bd3b4d71..7d2764da 100644
--- 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);
-- 
2.39.5