Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Commit 00e4465

Browse files
committed
Remove assert macro usage due to comments in review
Remove assert() for now, let's bring it back later when we have better platform and test framework support for it.
1 parent c3a9e85 commit 00e4465

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

source/libNsdl/src/sn_grs.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424
#include <string.h>
2525
#include <stdlib.h>
26-
#include <assert.h>
2726
#include "ns_list.h"
2827
#include "ns_types.h"
2928
#include "sn_nsdl.h"
@@ -286,8 +285,6 @@ extern int8_t sn_grs_update_resource(struct grs_s *handle, sn_nsdl_dynamic_resou
286285
return SN_NSDL_FAILURE;
287286
}
288287

289-
assert(res->static_resource_parameters != NULL);
290-
291288
/* Search resource */
292289
resource_temp = sn_grs_search_resource(handle,
293290
res->static_resource_parameters->pathlen,
@@ -335,8 +332,6 @@ extern int8_t sn_grs_create_resource(struct grs_s *handle, sn_nsdl_dynamic_resou
335332
return SN_NSDL_FAILURE;
336333
}
337334

338-
assert(res->static_resource_parameters != NULL);
339-
340335
/* Check path validity */
341336
if (!res->static_resource_parameters->pathlen || !res->static_resource_parameters->path) {
342337
return SN_GRS_INVALID_PATH;
@@ -375,7 +370,6 @@ extern int8_t sn_grs_create_resource(struct grs_s *handle, sn_nsdl_dynamic_resou
375370
static int8_t sn_grs_add_resource_to_list(struct grs_s *handle, sn_nsdl_dynamic_resource_parameters_s *resource_ptr)
376371
{
377372
/* Local variables */
378-
assert(resource_ptr->static_resource_parameters != NULL);
379373

380374
uint8_t *path_start_ptr = NULL;
381375
uint16_t path_len = 0;
@@ -496,8 +490,6 @@ int8_t sn_grs_put_resource(struct grs_s *handle, sn_nsdl_dynamic_resource_parame
496490
return SN_NSDL_FAILURE;
497491
}
498492

499-
assert(res->static_resource_parameters != NULL);
500-
501493
/* Check path validity */
502494
if (!res->static_resource_parameters->pathlen || !res->static_resource_parameters->path) {
503495
return SN_GRS_INVALID_PATH;

source/libNsdl/src/sn_nsdl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
*/
2222

2323
#include <string.h>
24-
#include <assert.h>
2524

2625
#include "ns_types.h"
2726
#include "sn_nsdl.h"

0 commit comments

Comments
 (0)