aboutsummaryrefslogtreecommitdiffstats
path: root/src/input_curl.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-26 20:56:46 +0100
committerMax Kellermann <max@duempel.org>2008-10-26 20:56:46 +0100
commit5c19776f2fc1416dab1da2f2baae9a0c764df965 (patch)
tree828f8f768be17f053e12fc38f2a7593e0a9b77b5 /src/input_curl.c
parent464b6117721056e72c79824a298caf53eb5cd452 (diff)
downloadmpd-5c19776f2fc1416dab1da2f2baae9a0c764df965.tar.gz
mpd-5c19776f2fc1416dab1da2f2baae9a0c764df965.tar.xz
mpd-5c19776f2fc1416dab1da2f2baae9a0c764df965.zip
input_stream: use "bool" instead of "int"
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
Diffstat (limited to 'src/input_curl.c')
-rw-r--r--src/input_curl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/input_curl.c b/src/input_curl.c
index e34ef5e22..42c66c236 100644
--- a/src/input_curl.c
+++ b/src/input_curl.c
@@ -241,7 +241,7 @@ input_curl_close(struct input_stream *is)
input_curl_free(is);
}
-static int
+static bool
input_curl_eof(mpd_unused struct input_stream *is)
{
struct input_curl *c = is->data;
@@ -397,7 +397,7 @@ input_curl_send_request(struct input_curl *c)
return true;
}
-static int
+static bool
input_curl_seek(struct input_stream *is, mpd_unused long offset,
mpd_unused int whence)
{
@@ -405,7 +405,7 @@ input_curl_seek(struct input_stream *is, mpd_unused long offset,
bool ret;
if (!is->seekable)
- return -1;
+ return false;
/* calculate the absolute offset */
@@ -423,11 +423,11 @@ input_curl_seek(struct input_stream *is, mpd_unused long offset,
break;
default:
- return -1;
+ return false;
}
if (is->offset < 0)
- return -1;
+ return false;
/* close the old connection and open a new one */
@@ -435,7 +435,7 @@ input_curl_seek(struct input_stream *is, mpd_unused long offset,
ret = input_curl_easy_init(is);
if (!ret)
- return -1;
+ return false;
/* send the "Range" header */
@@ -446,9 +446,9 @@ input_curl_seek(struct input_stream *is, mpd_unused long offset,
ret = input_curl_send_request(c);
if (!ret)
- return -1;
+ return false;
- return 0;
+ return true;
}
static bool