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

Remove assert macro usage due to comments in review #107

Merged
merged 1 commit into from
Dec 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions source/libNsdl/src/sn_grs.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include "ns_list.h"
#include "ns_types.h"
#include "sn_nsdl.h"
Expand Down Expand Up @@ -286,8 +285,6 @@ extern int8_t sn_grs_update_resource(struct grs_s *handle, sn_nsdl_dynamic_resou
return SN_NSDL_FAILURE;
}

assert(res->static_resource_parameters != NULL);

/* Search resource */
resource_temp = sn_grs_search_resource(handle,
res->static_resource_parameters->pathlen,
Expand Down Expand Up @@ -335,8 +332,6 @@ extern int8_t sn_grs_create_resource(struct grs_s *handle, sn_nsdl_dynamic_resou
return SN_NSDL_FAILURE;
}

assert(res->static_resource_parameters != NULL);

/* Check path validity */
if (!res->static_resource_parameters->pathlen || !res->static_resource_parameters->path) {
return SN_GRS_INVALID_PATH;
Expand Down Expand Up @@ -375,7 +370,6 @@ extern int8_t sn_grs_create_resource(struct grs_s *handle, sn_nsdl_dynamic_resou
static int8_t sn_grs_add_resource_to_list(struct grs_s *handle, sn_nsdl_dynamic_resource_parameters_s *resource_ptr)
{
/* Local variables */
assert(resource_ptr->static_resource_parameters != NULL);

uint8_t *path_start_ptr = NULL;
uint16_t path_len = 0;
Expand Down Expand Up @@ -496,8 +490,6 @@ int8_t sn_grs_put_resource(struct grs_s *handle, sn_nsdl_dynamic_resource_parame
return SN_NSDL_FAILURE;
}

assert(res->static_resource_parameters != NULL);

/* Check path validity */
if (!res->static_resource_parameters->pathlen || !res->static_resource_parameters->path) {
return SN_GRS_INVALID_PATH;
Expand Down
1 change: 0 additions & 1 deletion source/libNsdl/src/sn_nsdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/

#include <string.h>
#include <assert.h>

#include "ns_types.h"
#include "sn_nsdl.h"
Expand Down