From c2531f3f54e08dcd2828a6c82778aca2f47f0c5a Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 29 Dec 2008 12:05:52 +0100 Subject: Add missing #include "utils.h" --- src/usbmux.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/usbmux.c') diff --git a/src/usbmux.c b/src/usbmux.c index 2114758..9fb75ef 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -26,6 +26,7 @@ #include #include "usbmux.h" +#include "utils.h" static iphone_umux_client_t *connlist = NULL; static int clients = 0; -- cgit v1.1-32-gdbae From b22ea90796608bc4e44317275ee05944b0f45877 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 29 Dec 2008 12:06:15 +0100 Subject: Fix "missing return value" warning --- src/usbmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/usbmux.c') diff --git a/src/usbmux.c b/src/usbmux.c index 9fb75ef..4512dad 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -179,7 +179,7 @@ iphone_error_t iphone_mux_new_client(iphone_device_t device, uint16_t src_port, iphone_error_t iphone_mux_free_client(iphone_umux_client_t client) { if (!client || !client->phone) - return; + return IPHONE_E_INVALID_ARG; client->header->tcp_flags = 0x04; client->header->scnt = htonl(client->header->scnt); -- cgit v1.1-32-gdbae From d77ecbe3fbd73418dd72e147a0ac2a89e62b1cd9 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Mon, 29 Dec 2008 12:35:51 +0100 Subject: Fix function prototypes Add missing static, const, change function() to function(void) --- src/usbmux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/usbmux.c') diff --git a/src/usbmux.c b/src/usbmux.c index 4512dad..770d0db 100644 --- a/src/usbmux.c +++ b/src/usbmux.c @@ -58,7 +58,7 @@ usbmux_tcp_header *new_mux_packet(uint16 s_port, uint16 d_port) * * @return A USBMux header */ -usbmux_version_header *version_header() +usbmux_version_header *version_header(void) { usbmux_version_header *version = (usbmux_version_header *) malloc(sizeof(usbmux_version_header)); version->type = 0; @@ -77,7 +77,7 @@ usbmux_version_header *version_header() * * @param connection The connection to delete from the tracking list. */ -void delete_connection(iphone_umux_client_t connection) +static void delete_connection(iphone_umux_client_t connection) { iphone_umux_client_t *newlist = (iphone_umux_client_t *) malloc(sizeof(iphone_umux_client_t) * (clients - 1)); int i = 0, j = 0; @@ -106,7 +106,7 @@ void delete_connection(iphone_umux_client_t connection) * @param connection The connection to add to the global list of connections. */ -void add_connection(iphone_umux_client_t connection) +static void add_connection(iphone_umux_client_t connection) { iphone_umux_client_t *newlist = (iphone_umux_client_t *) realloc(connlist, sizeof(iphone_umux_client_t) * (clients + 1)); -- cgit v1.1-32-gdbae