Code

libmpdclient: fix shadow warnings
authorMax Kellermann <max@duempel.org>
Wed, 7 Jan 2009 22:35:16 +0000 (23:35 +0100)
committerMax Kellermann <max@duempel.org>
Wed, 7 Jan 2009 22:35:16 +0000 (23:35 +0100)
Renamed "time" variables.

src/libmpdclient.c
src/libmpdclient.h
src/mpdclient.h

index dfca0a347a0ae5b0de341f3ba214580427b056fe..c037caeace2c3c2aec59fe18509f7ae686101939 100644 (file)
@@ -164,9 +164,10 @@ static void mpd_freeReturnElement(mpd_ReturnElement * re) {
        free(re);
 }
 
-void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout) {
-       connection->timeout.tv_sec = (int)timeout;
-       connection->timeout.tv_usec = (int)(timeout*1e6 -
+void
+mpd_setConnectionTimeout(mpd_Connection *connection, float timeout_) {
+       connection->timeout.tv_sec = (int)timeout_;
+       connection->timeout.tv_usec = (int)(timeout_ * 1e6 -
                                            connection->timeout.tv_sec*1000000 +
                                            0.5);
 }
@@ -390,7 +391,8 @@ mpd_connect(mpd_Connection *connection, const char * host, int port)
        return -1;
 }
 
-mpd_Connection * mpd_newConnection(const char * host, int port, float timeout) {
+mpd_Connection *
+mpd_newConnection(const char *host, int port, float timeout_) {
        int err;
        char * rt;
        mpd_Connection * connection = malloc(sizeof(mpd_Connection));
@@ -408,7 +410,7 @@ mpd_Connection * mpd_newConnection(const char * host, int port, float timeout) {
        if (winsock_dll_error(connection))
                return connection;
 
-       mpd_setConnectionTimeout(connection,timeout);
+       mpd_setConnectionTimeout(connection, timeout_);
 
        err = mpd_connect(connection, host, port);
        if (err < 0)
@@ -1336,16 +1338,16 @@ void mpd_sendSwapIdCommand(mpd_Connection * connection, int id1, int id2) {
        free(string);
 }
 
-void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time) {
+void mpd_sendSeekCommand(mpd_Connection * connection, int song, int to) {
        char * string = malloc(strlen("seek")+25);
-       sprintf(string,"seek \"%i\" \"%i\"\n",song,time);
+       sprintf(string,"seek \"%i\" \"%i\"\n", song, to);
        mpd_sendInfoCommand(connection,string);
        free(string);
 }
 
-void mpd_sendSeekIdCommand(mpd_Connection * connection, int id, int time) {
+void mpd_sendSeekIdCommand(mpd_Connection * connection, int id, int to) {
        char * string = malloc(strlen("seekid")+25);
-       sprintf(string,"seekid \"%i\" \"%i\"\n",id,time);
+       sprintf(string,"seekid \"%i\" \"%i\"\n", id, to);
        mpd_sendInfoCommand(connection,string);
        free(string);
 }
index 8935536f0f6782ab7b2bee21986c1bfa9e5ebeb7..cfa87a7d0803a3d99a41bb542d98a4f753a9f608 100644 (file)
@@ -161,9 +161,11 @@ typedef struct _mpd_Connection {
  * even if an error has occurred
  * _timeout_ is the connection timeout period in seconds
  */
-mpd_Connection * mpd_newConnection(const char * host, int port, float timeout);
+mpd_Connection *
+mpd_newConnection(const char *host, int port, float timeout_);
 
-void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout);
+void
+mpd_setConnectionTimeout(mpd_Connection *connection, float timeout_);
 
 /* mpd_closeConnection
  * use this to close a connection and free'ing subsequent memory
@@ -446,9 +448,9 @@ void mpd_sendSwapCommand(mpd_Connection * connection, int song1, int song2);
 
 void mpd_sendSwapIdCommand(mpd_Connection * connection, int song1, int song2);
 
-void mpd_sendSeekCommand(mpd_Connection * connection, int song, int time);
+void mpd_sendSeekCommand(mpd_Connection * connection, int song, int to);
 
-void mpd_sendSeekIdCommand(mpd_Connection * connection, int song, int time);
+void mpd_sendSeekIdCommand(mpd_Connection * connection, int song, int to);
 
 void mpd_sendRepeatCommand(mpd_Connection * connection, int repeatMode);
 
index e3b662a3fbda9f9110b6bcb96c68f87679822032..1b52d06e9c739583f1ef11004bfeb935e8bc1e59 100644 (file)
@@ -38,7 +38,7 @@ mpdclient_finish_command(mpdclient_t *c);
 mpdclient_t *mpdclient_new(void);
 void mpdclient_free(mpdclient_t *c);
 gint mpdclient_connect(mpdclient_t *c, gchar *host, gint port,
-                      gfloat timeout, gchar *password);
+                      gfloat timeout_, gchar *password);
 gint mpdclient_disconnect(mpdclient_t *c);
 gint mpdclient_update(mpdclient_t *c);