aboutsummaryrefslogtreecommitdiffstats
path: root/src/interface.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-08-01 04:18:41 +0000
committerEric Wong <normalperson@yhbt.net>2006-08-01 04:18:41 +0000
commit5aca21a502839e2cfd30f0cfb186badc302a7eb5 (patch)
tree9e8b25b4b2c648a85dedcfe69c1bc7100564b4f9 /src/interface.c
parent9ccf40b24293198c8091ca5dc269006776b080bc (diff)
downloadmpd-5aca21a502839e2cfd30f0cfb186badc302a7eb5.tar.gz
mpd-5aca21a502839e2cfd30f0cfb186badc302a7eb5.tar.xz
mpd-5aca21a502839e2cfd30f0cfb186badc302a7eb5.zip
Several fixes uncovered with -pedantic
playerData.c: proper error checking directory.c: properly check myFgets() for errors (it returns NULL on error) inputPlugins/mp3_plugin.c get rid of commas at the end of enums interface.c: we weren't using long long, so strtoll isn't needed get rid of void-pointer arithmetic sllist.c: get rid of void-pointer arithmetic compress.c: get rid of C++ comments, some compilers don't accept them Note that I personally like void pointer arithmetic, but some ancient compilers don't support them :( git-svn-id: https://svn.musicpd.org/mpd/trunk@4510 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interface.c b/src/interface.c
index 130deffad..99d891bee 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -570,8 +570,8 @@ void initInterfaces(void)
param = getConfigParam(CONF_MAX_COMMAND_LIST_SIZE);
if (param) {
- interface_max_command_list_size = strtoll(param->value,
- &test, 10);
+ interface_max_command_list_size = strtol(param->value,
+ &test, 10);
if (*test != '\0' || interface_max_command_list_size <= 0) {
ERROR("max command list size \"%s\" is not a positive "
"integer, line %i\n", param->value, param->line);
@@ -583,8 +583,8 @@ void initInterfaces(void)
param = getConfigParam(CONF_MAX_OUTPUT_BUFFER_SIZE);
if (param) {
- interface_max_output_buffer_size = strtoll(param->value, &test,
- 10);
+ interface_max_output_buffer_size = strtol(param->value,
+ &test, 10);
if (*test != '\0' || interface_max_output_buffer_size <= 0) {
ERROR("max output buffer size \"%s\" is not a positive "
"integer, line %i\n", param->value, param->line);
@@ -660,7 +660,7 @@ static void flushInterfaceBuffer(Interface * interface)
break;
else if (ret < buf->size) {
interface->deferred_bytes -= ret;
- buf->data += ret;
+ buf->data = (char *)buf->data + ret;
buf->size -= ret;
} else {
struct sllnode *tmp = buf;