diff options
| -rw-r--r-- | src/AFC.c | 2 | ||||
| -rw-r--r-- | src/initconf.c | 4 | ||||
| -rw-r--r-- | src/iphone.c | 2 | ||||
| -rw-r--r-- | src/lockdown.c | 6 | ||||
| -rw-r--r-- | src/lockdown.h | 4 | ||||
| -rw-r--r-- | src/plist.c | 4 | ||||
| -rw-r--r-- | src/plist.h | 2 | ||||
| -rw-r--r-- | src/usbmux.c | 6 | ||||
| -rw-r--r-- | src/usbmux.h | 2 | ||||
| -rw-r--r-- | src/userpref.c | 6 | ||||
| -rw-r--r-- | src/userpref.h | 2 |
11 files changed, 20 insertions, 20 deletions
| @@ -557,7 +557,7 @@ iphone_error_t iphone_afc_mkdir(iphone_afc_client_t client, const char *dir) | |||
| 557 | * @return A pointer to an AFCFile struct containing the information received, | 557 | * @return A pointer to an AFCFile struct containing the information received, |
| 558 | * or NULL on failure. | 558 | * or NULL on failure. |
| 559 | */ | 559 | */ |
| 560 | iphone_afc_file_t afc_get_file_info(iphone_afc_client_t client, const char *path) | 560 | static iphone_afc_file_t afc_get_file_info(iphone_afc_client_t client, const char *path) |
| 561 | { | 561 | { |
| 562 | char *received, **list; | 562 | char *received, **list; |
| 563 | iphone_afc_file_t my_file; | 563 | iphone_afc_file_t my_file; |
diff --git a/src/initconf.c b/src/initconf.c index 8aca2a6..205c97a 100644 --- a/src/initconf.c +++ b/src/initconf.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | * | 36 | * |
| 37 | * @param key The pointer to the desired location of the new key. | 37 | * @param key The pointer to the desired location of the new key. |
| 38 | */ | 38 | */ |
| 39 | void generate_key(gpointer key) | 39 | static void generate_key(gpointer key) |
| 40 | { | 40 | { |
| 41 | gnutls_x509_privkey_generate(*((gnutls_x509_privkey_t *) key), GNUTLS_PK_RSA, 2048, 0); | 41 | gnutls_x509_privkey_generate(*((gnutls_x509_privkey_t *) key), GNUTLS_PK_RSA, 2048, 0); |
| 42 | g_thread_exit(0); | 42 | g_thread_exit(0); |
| @@ -44,7 +44,7 @@ void generate_key(gpointer key) | |||
| 44 | 44 | ||
| 45 | /** Simple function that generates a spinner until the mutex is released. | 45 | /** Simple function that generates a spinner until the mutex is released. |
| 46 | */ | 46 | */ |
| 47 | void progress_bar(gpointer mutex) | 47 | static void progress_bar(gpointer mutex) |
| 48 | { | 48 | { |
| 49 | const char *spinner = "|/-\\|/-\\"; | 49 | const char *spinner = "|/-\\|/-\\"; |
| 50 | int i = 0; | 50 | int i = 0; |
diff --git a/src/iphone.c b/src/iphone.c index 86226e7..f733219 100644 --- a/src/iphone.c +++ b/src/iphone.c | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | * descriptor on return. | 42 | * descriptor on return. |
| 43 | * @return IPHONE_E_SUCCESS if ok, otherwise an error code. | 43 | * @return IPHONE_E_SUCCESS if ok, otherwise an error code. |
| 44 | */ | 44 | */ |
| 45 | iphone_error_t iphone_get_specific_device(int bus_n, int dev_n, iphone_device_t * device) | 45 | static iphone_error_t iphone_get_specific_device(unsigned int bus_n, int dev_n, iphone_device_t * device) |
| 46 | { | 46 | { |
| 47 | struct usb_bus *bus, *busses; | 47 | struct usb_bus *bus, *busses; |
| 48 | struct usb_device *dev; | 48 | struct usb_device *dev; |
diff --git a/src/lockdown.c b/src/lockdown.c index 80d3937..e0cbe78 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
| @@ -40,7 +40,7 @@ const ASN1_ARRAY_TYPE pkcs1_asn1_tab[] = { | |||
| 40 | {0, 0, 0} | 40 | {0, 0, 0} |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | int get_rand(int min, int max) | 43 | static int get_rand(int min, int max) |
| 44 | { | 44 | { |
| 45 | int retval = (rand() % (max - min)) + min; | 45 | int retval = (rand() % (max - min)) + min; |
| 46 | return retval; | 46 | return retval; |
| @@ -50,7 +50,7 @@ int get_rand(int min, int max) | |||
| 50 | * | 50 | * |
| 51 | * @param A null terminated string containing a valid HostID. | 51 | * @param A null terminated string containing a valid HostID. |
| 52 | */ | 52 | */ |
| 53 | char *lockdownd_generate_hostid() | 53 | char *lockdownd_generate_hostid(void) |
| 54 | { | 54 | { |
| 55 | char *hostid = (char *) malloc(sizeof(char) * 37); // HostID's are just UUID's, and UUID's are 36 characters long | 55 | char *hostid = (char *) malloc(sizeof(char) * 37); // HostID's are just UUID's, and UUID's are 36 characters long |
| 56 | const char *chars = "ABCDEF0123456789"; | 56 | const char *chars = "ABCDEF0123456789"; |
| @@ -256,7 +256,7 @@ iphone_error_t lockdownd_hello(iphone_lckd_client_t control) | |||
| 256 | * | 256 | * |
| 257 | * @return IPHONE_E_SUCCESS on success. | 257 | * @return IPHONE_E_SUCCESS on success. |
| 258 | */ | 258 | */ |
| 259 | iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, char *req_key, char *req_string, char **value) | 259 | iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, const char *req_key, const char *req_string, char **value) |
| 260 | { | 260 | { |
| 261 | if (!control || !req_key || !value || (value && *value)) | 261 | if (!control || !req_key || !value || (value && *value)) |
| 262 | return IPHONE_E_INVALID_ARG; | 262 | return IPHONE_E_INVALID_ARG; |
diff --git a/src/lockdown.h b/src/lockdown.h index 9176524..012ac72 100644 --- a/src/lockdown.h +++ b/src/lockdown.h | |||
| @@ -40,11 +40,11 @@ struct iphone_lckd_client_int { | |||
| 40 | int gtls_buffer_hack_len; | 40 | int gtls_buffer_hack_len; |
| 41 | }; | 41 | }; |
| 42 | 42 | ||
| 43 | char *lockdownd_generate_hostid(); | 43 | char *lockdownd_generate_hostid(void); |
| 44 | 44 | ||
| 45 | iphone_lckd_client_t new_lockdownd_client(iphone_device_t phone); | 45 | iphone_lckd_client_t new_lockdownd_client(iphone_device_t phone); |
| 46 | iphone_error_t lockdownd_hello(iphone_lckd_client_t control); | 46 | iphone_error_t lockdownd_hello(iphone_lckd_client_t control); |
| 47 | iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, char *req_key, char *req_string, char **value); | 47 | iphone_error_t lockdownd_generic_get_value(iphone_lckd_client_t control, const char *req_key, const char *req_string, char **value); |
| 48 | iphone_error_t lockdownd_get_device_uid(iphone_lckd_client_t control, char **uid); | 48 | iphone_error_t lockdownd_get_device_uid(iphone_lckd_client_t control, char **uid); |
| 49 | iphone_error_t lockdownd_get_device_public_key(iphone_lckd_client_t control, char **public_key); | 49 | iphone_error_t lockdownd_get_device_public_key(iphone_lckd_client_t control, char **public_key); |
| 50 | 50 | ||
diff --git a/src/plist.c b/src/plist.c index c4d6bfa..b9d9e6a 100644 --- a/src/plist.c +++ b/src/plist.c | |||
| @@ -40,7 +40,7 @@ const char *plist_base = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\ | |||
| 40 | * | 40 | * |
| 41 | * @return The formatted string. | 41 | * @return The formatted string. |
| 42 | */ | 42 | */ |
| 43 | char *format_string(const char *buf, int cols, int depth) | 43 | static char *format_string(const char *buf, int cols, int depth) |
| 44 | { | 44 | { |
| 45 | int colw = depth + cols + 1; | 45 | int colw = depth + cols + 1; |
| 46 | int len = strlen(buf); | 46 | int len = strlen(buf); |
| @@ -73,7 +73,7 @@ char *format_string(const char *buf, int cols, int depth) | |||
| 73 | * | 73 | * |
| 74 | * @return The plist XML document. | 74 | * @return The plist XML document. |
| 75 | */ | 75 | */ |
| 76 | xmlDocPtr new_plist() | 76 | xmlDocPtr new_plist(void) |
| 77 | { | 77 | { |
| 78 | char *plist = strdup(plist_base); | 78 | char *plist = strdup(plist_base); |
| 79 | xmlDocPtr plist_xml = xmlReadMemory(plist, strlen(plist), NULL, NULL, 0); | 79 | xmlDocPtr plist_xml = xmlReadMemory(plist, strlen(plist), NULL, NULL, 0); |
diff --git a/src/plist.h b/src/plist.h index b27a0c5..cd2028e 100644 --- a/src/plist.h +++ b/src/plist.h | |||
| @@ -31,7 +31,7 @@ xmlNode *add_key_data_dict_element(xmlDocPtr plist, xmlNode * dict, const char * | |||
| 31 | xmlNode *add_child_to_plist(xmlDocPtr plist, const char *name, const char *content, xmlNode * to_node, int depth); | 31 | xmlNode *add_child_to_plist(xmlDocPtr plist, const char *name, const char *content, xmlNode * to_node, int depth); |
| 32 | 32 | ||
| 33 | void free_plist(xmlDocPtr plist); | 33 | void free_plist(xmlDocPtr plist); |
| 34 | xmlDocPtr new_plist(); | 34 | xmlDocPtr new_plist(void); |
| 35 | 35 | ||
| 36 | char **read_dict_element_strings(xmlNode * dict); | 36 | char **read_dict_element_strings(xmlNode * dict); |
| 37 | void free_dictionary(char **dictionary); | 37 | void free_dictionary(char **dictionary); |
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) | |||
| 58 | * | 58 | * |
| 59 | * @return A USBMux header | 59 | * @return A USBMux header |
| 60 | */ | 60 | */ |
| 61 | usbmux_version_header *version_header() | 61 | usbmux_version_header *version_header(void) |
| 62 | { | 62 | { |
| 63 | usbmux_version_header *version = (usbmux_version_header *) malloc(sizeof(usbmux_version_header)); | 63 | usbmux_version_header *version = (usbmux_version_header *) malloc(sizeof(usbmux_version_header)); |
| 64 | version->type = 0; | 64 | version->type = 0; |
| @@ -77,7 +77,7 @@ usbmux_version_header *version_header() | |||
| 77 | * | 77 | * |
| 78 | * @param connection The connection to delete from the tracking list. | 78 | * @param connection The connection to delete from the tracking list. |
| 79 | */ | 79 | */ |
| 80 | void delete_connection(iphone_umux_client_t connection) | 80 | static void delete_connection(iphone_umux_client_t connection) |
| 81 | { | 81 | { |
| 82 | iphone_umux_client_t *newlist = (iphone_umux_client_t *) malloc(sizeof(iphone_umux_client_t) * (clients - 1)); | 82 | iphone_umux_client_t *newlist = (iphone_umux_client_t *) malloc(sizeof(iphone_umux_client_t) * (clients - 1)); |
| 83 | int i = 0, j = 0; | 83 | int i = 0, j = 0; |
| @@ -106,7 +106,7 @@ void delete_connection(iphone_umux_client_t connection) | |||
| 106 | * @param connection The connection to add to the global list of connections. | 106 | * @param connection The connection to add to the global list of connections. |
| 107 | */ | 107 | */ |
| 108 | 108 | ||
| 109 | void add_connection(iphone_umux_client_t connection) | 109 | static void add_connection(iphone_umux_client_t connection) |
| 110 | { | 110 | { |
| 111 | iphone_umux_client_t *newlist = | 111 | iphone_umux_client_t *newlist = |
| 112 | (iphone_umux_client_t *) realloc(connlist, sizeof(iphone_umux_client_t) * (clients + 1)); | 112 | (iphone_umux_client_t *) realloc(connlist, sizeof(iphone_umux_client_t) * (clients + 1)); |
diff --git a/src/usbmux.h b/src/usbmux.h index da8a361..fd5fc78 100644 --- a/src/usbmux.h +++ b/src/usbmux.h | |||
| @@ -56,7 +56,7 @@ typedef struct { | |||
| 56 | uint32 type, length, major, minor, allnull; | 56 | uint32 type, length, major, minor, allnull; |
| 57 | } usbmux_version_header; | 57 | } usbmux_version_header; |
| 58 | 58 | ||
| 59 | usbmux_version_header *version_header(); | 59 | usbmux_version_header *version_header(void); |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | #endif | 62 | #endif |
diff --git a/src/userpref.c b/src/userpref.c index 6e2f9d8..5f227b0 100644 --- a/src/userpref.c +++ b/src/userpref.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | /** Creates a freedesktop compatible configuration directory for libiphone. | 40 | /** Creates a freedesktop compatible configuration directory for libiphone. |
| 41 | */ | 41 | */ |
| 42 | inline void create_config_dir() | 42 | static void create_config_dir(void) |
| 43 | { | 43 | { |
| 44 | gchar *config_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), LIBIPHONE_CONF_DIR, NULL); | 44 | gchar *config_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), LIBIPHONE_CONF_DIR, NULL); |
| 45 | 45 | ||
| @@ -56,7 +56,7 @@ inline void create_config_dir() | |||
| 56 | * | 56 | * |
| 57 | * @return The string containing the HostID or NULL | 57 | * @return The string containing the HostID or NULL |
| 58 | */ | 58 | */ |
| 59 | char *get_host_id() | 59 | char *get_host_id(void) |
| 60 | { | 60 | { |
| 61 | char *host_id = NULL; | 61 | char *host_id = NULL; |
| 62 | gchar *config_file; | 62 | gchar *config_file; |
| @@ -144,7 +144,7 @@ int store_device_public_key(char *uid, char *public_key) | |||
| 144 | * | 144 | * |
| 145 | * @return 1 if the file contents where read successfully and 0 otherwise. | 145 | * @return 1 if the file contents where read successfully and 0 otherwise. |
| 146 | */ | 146 | */ |
| 147 | int read_file_in_confdir(char *file, gnutls_datum_t * data) | 147 | static int read_file_in_confdir(const char *file, gnutls_datum_t * data) |
| 148 | { | 148 | { |
| 149 | gboolean success; | 149 | gboolean success; |
| 150 | gsize size; | 150 | gsize size; |
diff --git a/src/userpref.h b/src/userpref.h index 5171929..e7835d0 100644 --- a/src/userpref.h +++ b/src/userpref.h | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | * | 28 | * |
| 29 | * @return the HostID if exist in config file. Returns NULL otherwise. | 29 | * @return the HostID if exist in config file. Returns NULL otherwise. |
| 30 | */ | 30 | */ |
| 31 | char *get_host_id(); | 31 | char *get_host_id(void); |
| 32 | 32 | ||
| 33 | /** | 33 | /** |
| 34 | * Determine if we already paired this device. | 34 | * Determine if we already paired this device. |
