aboutsummaryrefslogtreecommitdiffstats
path: root/src/interface.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-01 16:24:41 -0700
committerEric Wong <normalperson@yhbt.net>2008-09-01 16:24:41 -0700
commitc36029fc806cf083de3aaf1344d6bd2be8db316f (patch)
treeda88b1f073b8125d764b94b924492d2b05ea4c69 /src/interface.c
parentaa0755f53545fcf343f791f04760f6b934e022e4 (diff)
parent6982a829e22d2bc7cf7c829c4430a4ea6f5bc7fa (diff)
downloadmpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.tar.gz
mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.tar.xz
mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.zip
Merge branch 'mk/cleanups'
* mk/cleanups: (60 commits) pass constant pointers const pointers unsigned integers and size_t oggflac: fix GCC warnings include cleanup protect locate.h from double inclusion playlist: eliminate unused fd parameters jack: made "sample_size" static const moved jack configuration to the JackData struct jack: removed unused macros jack: don't set audioOutput->data=NULL jack: initialize JackData in jack_initDriver() jack: added freeJackClient() jack: initialize jd->client after !jd check jack: eliminate superfluous freeJackData() calls mp3: converted the MUTEFRAME_ macros to an enum mp3: converted the DECODE_ constants to an enum wavpack: don't use "isp" before initialization wavpack: moved code to wavpack_open_wvc() simplified code in the ogg decoder plugin ...
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 45b81a2f7..83e0084b5 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -234,7 +234,7 @@ static void closeInterface(Interface * interface)
SECURE("interface %i: closed\n", interface->num);
}
-void openAInterface(int fd, struct sockaddr *addr)
+void openAInterface(int fd, const struct sockaddr *addr)
{
unsigned int i;
@@ -249,7 +249,7 @@ void openAInterface(int fd, struct sockaddr *addr)
switch (addr->sa_family) {
#ifdef HAVE_TCP
case AF_INET:
- hostname = (const char *)inet_ntoa(((struct sockaddr_in *)
+ hostname = (const char *)inet_ntoa(((const struct sockaddr_in *)
addr)->sin_addr);
if (!hostname)
hostname = "error getting ipv4 address";
@@ -259,8 +259,8 @@ void openAInterface(int fd, struct sockaddr *addr)
{
static char host[INET6_ADDRSTRLEN + 1];
memset(host, 0, INET6_ADDRSTRLEN + 1);
- if (inet_ntop(AF_INET6, (void *)
- &(((struct sockaddr_in6 *)addr)->
+ if (inet_ntop(AF_INET6, (const void *)
+ &(((const struct sockaddr_in6 *)addr)->
sin6_addr), host,
INET6_ADDRSTRLEN)) {
hostname = (const char *)host;
@@ -686,7 +686,7 @@ static void flushInterfaceBuffer(Interface * interface)
}
}
-int interfacePrintWithFD(int fd, char *buffer, size_t buflen)
+int interfacePrintWithFD(int fd, const char *buffer, size_t buflen)
{
static unsigned int i;
size_t copylen;