diff options
Diffstat (limited to 'samsung-ipc/misc.c')
-rw-r--r-- | samsung-ipc/misc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/samsung-ipc/misc.c b/samsung-ipc/misc.c index 96798cf..9241453 100644 --- a/samsung-ipc/misc.c +++ b/samsung-ipc/misc.c @@ -1,4 +1,4 @@ -/** +/* * This file is part of libsamsung-ipc. * * Copyright (C) 2011 Simon Busch <morphis@gravedo.de> @@ -17,19 +17,21 @@ * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>. * */ +#include <stdlib.h> +#include <string.h> #include <samsung-ipc.h> -#include <string.h> -#define DEFAULT_IMSI_LENGTH 15 +#define DEFAULT_IMSI_LENGTH 15 -char* ipc_misc_me_imsi_response_get_imsi(struct ipc_message_info *response) +char *ipc_misc_me_imsi_response_get_imsi(struct ipc_message_info *response) { if (response == NULL || response->data[0] != DEFAULT_IMSI_LENGTH) return NULL; - char *buffer = (char*) malloc(sizeof(char) * DEFAULT_IMSI_LENGTH); + char *buffer = (char *) malloc(sizeof(char) * DEFAULT_IMSI_LENGTH); memcpy(buffer, &response->data[1], DEFAULT_IMSI_LENGTH); + return buffer; } |