From c9dfae7a17ea4e5a2e114df331942f70d48bfe5b Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Tue, 25 Jun 2013 22:18:41 +0200 Subject: Refactor code for consistent coding style and avoid using assert Change-Id: Idca5edb70869e07d35744301b185df02e42f5b4c Signed-off-by: Paul Kocialkowski --- samsung-ipc/misc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'samsung-ipc/misc.c') 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 @@ -17,19 +17,21 @@ * along with libsamsung-ipc. If not, see . * */ +#include +#include #include -#include -#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; } -- cgit v1.2.3