From 21d8065b208535eb63b7e2ee417332aae25f2380 Mon Sep 17 00:00:00 2001 From: Avuton Olrich Date: Fri, 14 Jul 2006 19:06:25 +0000 Subject: [CLEANUP] Remove unused code Static what makes sense git-svn-id: https://svn.musicpd.org/mpd/trunk@4327 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/interface.c | 44 ++++++++++++-------------------------------- 1 file changed, 12 insertions(+), 32 deletions(-) (limited to 'src/interface.c') diff --git a/src/interface.c b/src/interface.c index 7d29fbe74..429865240 100644 --- a/src/interface.c +++ b/src/interface.c @@ -83,13 +83,13 @@ typedef struct _Interface { int outBufSize; } Interface; -Interface * interfaces = NULL; +static Interface * interfaces = NULL; -void flushInterfaceBuffer(Interface * interface); +static void flushInterfaceBuffer(Interface * interface); -void printInterfaceOutBuffer(Interface * interface); +static void printInterfaceOutBuffer(Interface * interface); -void openInterface(Interface * interface, int fd) { +static void openInterface(Interface * interface, int fd) { int flags; assert(interface->open==0); @@ -135,7 +135,7 @@ void openInterface(Interface * interface, int fd) { printInterfaceOutBuffer(interface); } -void closeInterface(Interface * interface) { +static void closeInterface(Interface * interface) { if (!interface->open) return; interface->open = 0; @@ -330,7 +330,7 @@ static int processBytesRead(Interface * interface, int bytesRead) { return ret; } -int interfaceReadInput(Interface * interface) { +static int interfaceReadInput(Interface * interface) { int bytesRead; bytesRead = read(interface->fd, @@ -346,7 +346,7 @@ int interfaceReadInput(Interface * interface) { return 1; } -void addInterfacesReadyToReadAndListenSocketToFdSet(fd_set * fds, int * fdmax) { +static void addInterfacesReadyToReadAndListenSocketToFdSet(fd_set * fds, int * fdmax) { int i; FD_ZERO(fds); @@ -360,7 +360,7 @@ void addInterfacesReadyToReadAndListenSocketToFdSet(fd_set * fds, int * fdmax) { } } -void addInterfacesForBufferFlushToFdSet(fd_set * fds, int * fdmax) { +static void addInterfacesForBufferFlushToFdSet(fd_set * fds, int * fdmax) { int i; FD_ZERO(fds); @@ -373,7 +373,7 @@ void addInterfacesForBufferFlushToFdSet(fd_set * fds, int * fdmax) { } } -void closeNextErroredInterface() { +static void closeNextErroredInterface() { fd_set fds; struct timeval tv; int i; @@ -506,7 +506,7 @@ void initInterfaces() { } } -void closeAllInterfaces() { +static void closeAllInterfaces() { int i; fflush(NULL); @@ -545,17 +545,7 @@ void closeOldInterfaces() { } } -void closeInterfaceWithFD(int fd) { - int i; - - for(i=0;i