summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorcboesch <cboesch@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-11-07 21:48:12 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-14 12:09:47 +0200
commitcd66de0b8abb4187ae2242ea9279ed30fb75ee7f (patch)
treea13b874a011cf014d64bbaa207d6e604a525b262 /stream
parentcbb7ef057ce2f843d97146da9390452ae1c37d72 (diff)
downloadmpv-cd66de0b8abb4187ae2242ea9279ed30fb75ee7f.tar.bz2
mpv-cd66de0b8abb4187ae2242ea9279ed30fb75ee7f.tar.xz
stream/network.c: Replace hardcoded str size with sizeof
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32603 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/network.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/network.c b/stream/network.c
index d614774a96..817ce45414 100644
--- a/stream/network.c
+++ b/stream/network.c
@@ -216,14 +216,14 @@ http_send_request( URL_t *url, off_t pos ) {
http_set_uri( http_hdr, server_url->file );
}
if (server_url->port && server_url->port != 80)
- snprintf(str, 256, "Host: %s:%d", server_url->hostname, server_url->port );
+ snprintf(str, sizeof(str), "Host: %s:%d", server_url->hostname, server_url->port );
else
- snprintf(str, 256, "Host: %s", server_url->hostname );
+ snprintf(str, sizeof(str), "Host: %s", server_url->hostname );
http_set_field( http_hdr, str);
if (network_useragent)
- snprintf(str, 256, "User-Agent: %s", network_useragent);
+ snprintf(str, sizeof(str), "User-Agent: %s", network_useragent);
else
- snprintf(str, 256, "User-Agent: %s", mplayer_version);
+ snprintf(str, sizeof(str), "User-Agent: %s", mplayer_version);
http_set_field(http_hdr, str);
if (network_referrer) {
@@ -248,7 +248,7 @@ http_send_request( URL_t *url, off_t pos ) {
if(pos>0) {
// Extend http_send_request with possibility to do partial content retrieval
- snprintf(str, 256, "Range: bytes=%"PRId64"-", (int64_t)pos);
+ snprintf(str, sizeof(str), "Range: bytes=%"PRId64"-", (int64_t)pos);
http_set_field(http_hdr, str);
}