summaryrefslogtreecommitdiff
path: root/cleopatre/devkit/plcd
diff options
context:
space:
mode:
authorYacine Belkadi2011-03-24 17:54:56 +0100
committerYacine Belkadi2011-03-25 12:01:15 +0100
commit0133051f0162ccf9072f571e2e5dc8ea479c0be0 (patch)
treeef8e4606e061802cc95c3722659d7cd70a9d01d3 /cleopatre/devkit/plcd
parent81296fa875f32e8a1a8f4360b2a3659cf66fc212 (diff)
cleo/devkit/plcd: add some missing PLCD_ASSERT
Diffstat (limited to 'cleopatre/devkit/plcd')
-rw-r--r--cleopatre/devkit/plcd/src/plcd_mcast.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cleopatre/devkit/plcd/src/plcd_mcast.c b/cleopatre/devkit/plcd/src/plcd_mcast.c
index 5306dad4e4..d820681f51 100644
--- a/cleopatre/devkit/plcd/src/plcd_mcast.c
+++ b/cleopatre/devkit/plcd/src/plcd_mcast.c
@@ -105,6 +105,9 @@ is_multicast_mac_addr (const unsigned char *mac_addr)
static mcast_read_status_t
plcd_mcast_read_groups (mcast_group_t *groups, uint8_t *group_count)
{
+ PLCD_ASSERT (groups != NULL);
+ PLCD_ASSERT (group_count != NULL);
+
FILE *fp = fopen (LIBSPID_MCAST_INFO_PATH, "r");
if (fp == NULL)
{
@@ -210,6 +213,9 @@ plcd_mcast_send_info (plcd_ctx_t *ctx,
const mcast_group_t *groups,
unsigned int group_count)
{
+ PLCD_ASSERT (ctx != NULL);
+ PLCD_ASSERT ((group_count == 0) || ((group_count > 0) && (groups != NULL)));
+
syslog (LOG_INFO, __func__);
mme_ctx_t request_ctx;
@@ -312,6 +318,8 @@ plcd_mcast_send_info (plcd_ctx_t *ctx,
libspid_boolean_t
plcd_mcast_info_updated (plcd_ctx_t *ctx)
{
+ PLCD_ASSERT (ctx != NULL);
+
struct stat file_stat;
memset (&file_stat, 0, sizeof (struct stat));
@@ -339,6 +347,8 @@ plcd_mcast_info_updated (plcd_ctx_t *ctx)
void
plcd_mcast_process (plcd_ctx_t *ctx)
{
+ PLCD_ASSERT (ctx != NULL);
+
uint8_t group_count = 0;
mcast_group_t *groups = malloc (sizeof (mcast_group_t ) * MCAST_GROUP_MAX_NB);
if (groups != NULL)