aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/radio.h2
-rw-r--r--samsung-ipc/device/aries/aries_ipc.c6
-rw-r--r--samsung-ipc/device/crespo/crespo_ipc.c8
-rw-r--r--samsung-ipc/device/xmm6260/xmm6260_ipc.c6
-rw-r--r--samsung-ipc/ipc.c2
5 files changed, 13 insertions, 11 deletions
diff --git a/include/radio.h b/include/radio.h
index bba9e60..55de7dd 100644
--- a/include/radio.h
+++ b/include/radio.h
@@ -88,7 +88,7 @@ int ipc_client_power_off(struct ipc_client *client);
int ipc_client_gprs_handlers_available(struct ipc_client *client);
int ipc_client_gprs_activate(struct ipc_client *client);
int ipc_client_gprs_deactivate(struct ipc_client *client);
-char* ipc_client_gprs_get_iface(struct ipc_client *client, int cid);
+char *ipc_client_gprs_get_iface(struct ipc_client *client, int cid);
int ipc_client_gprs_get_capabilities(struct ipc_client *client, struct ipc_client_gprs_capabilities *cap);
int ipc_client_recv(struct ipc_client *client, struct ipc_message_info *response);
diff --git a/samsung-ipc/device/aries/aries_ipc.c b/samsung-ipc/device/aries/aries_ipc.c
index d987822..9741764 100644
--- a/samsung-ipc/device/aries/aries_ipc.c
+++ b/samsung-ipc/device/aries/aries_ipc.c
@@ -835,10 +835,10 @@ int aries_ipc_gprs_deactivate(void *data)
return 0;
}
-char* aries_ipc_gprs_get_iface(int cid)
+char *aries_ipc_gprs_get_iface(int cid)
{
struct ifreq ifr;
- char *iface;
+ char *iface = NULL;
int fd;
int rc;
int i;
@@ -854,7 +854,7 @@ char* aries_ipc_gprs_get_iface(int cid)
if(rc < 0 || ifr.ifr_flags & IFF_UP) {
continue;
} else {
- asprintf(iface, "%s%d", GPRS_IFACE_PREFIX, i);
+ asprintf(&iface, "%s%d", GPRS_IFACE_PREFIX, i);
return iface;
}
}
diff --git a/samsung-ipc/device/crespo/crespo_ipc.c b/samsung-ipc/device/crespo/crespo_ipc.c
index 437c680..31e2bd5 100644
--- a/samsung-ipc/device/crespo/crespo_ipc.c
+++ b/samsung-ipc/device/crespo/crespo_ipc.c
@@ -587,10 +587,12 @@ int crespo_ipc_power_off(void *io_data)
return 0;
}
-char* crespo_ipc_gprs_get_iface(int cid)
+char *crespo_ipc_gprs_get_iface(int cid)
{
- char *iface;
- asprintf(iface, "%s%d", GPRS_IFACE_PREFIX, 0);
+ char *iface = NULL;
+
+ asprintf(&iface, "%s%d", GPRS_IFACE_PREFIX, 0);
+
return iface;
}
diff --git a/samsung-ipc/device/xmm6260/xmm6260_ipc.c b/samsung-ipc/device/xmm6260/xmm6260_ipc.c
index f7fbcc9..01a6fee 100644
--- a/samsung-ipc/device/xmm6260/xmm6260_ipc.c
+++ b/samsung-ipc/device/xmm6260/xmm6260_ipc.c
@@ -344,14 +344,14 @@ int xmm6260_ipc_power_off(void *io_data)
return 0;
}
-char* xmm6260_ipc_gprs_get_iface(int cid)
+char *xmm6260_ipc_gprs_get_iface(int cid)
{
- char *iface;
+ char *iface = NULL;
if(cid > GPRS_IFACE_COUNT)
return NULL;
- asprintf(iface, "%s%d", GPRS_IFACE_PREFIX, cid - 1);
+ asprintf(&iface, "%s%d", GPRS_IFACE_PREFIX, cid - 1);
return iface;
}
diff --git a/samsung-ipc/ipc.c b/samsung-ipc/ipc.c
index 62bce28..a21575e 100644
--- a/samsung-ipc/ipc.c
+++ b/samsung-ipc/ipc.c
@@ -399,7 +399,7 @@ int ipc_client_gprs_deactivate(struct ipc_client *client)
return client->handlers->gprs_deactivate(client->handlers->gprs_deactivate_data);
}
-char* ipc_client_gprs_get_iface(struct ipc_client *client, int cid)
+char *ipc_client_gprs_get_iface(struct ipc_client *client, int cid)
{
if (client == NULL ||
client->gprs_specs == NULL ||