Skip to content

Conversation

anarey
Copy link

@anarey anarey commented Oct 24, 2016

No description provided.

assert(opaque);
assert(config);
char err[BUFSIZ];
char err[BUFSIZ] = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be initialized

assert(MSE_OPAQUE_MAGIC == opaque->magic);
#endif
char err[BUFSIZ];
char err[BUFSIZ] = "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be initialized

void mse_opaque_done(void *_opaque) {
assert(_opaque);

if (NULL == _opaque){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_opaque should never be NULL (the previous assert & we are freeing data)


json_array_foreach(mse_array, _index, value) {
parse_sensor(value, new_db);
ret = parse_sensor(value, new_db);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const int ret = parse_sensor

int in_addr_list_contains(const in_addr_list_t *list,const struct in_addr *addr){
in_addr_list_node_t *n=NULL;
for(n=LIST_FIRST(syslist(list));n!=NULL;n=LIST_NEXT(n,entry)){
if (NULL == n){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can't be NULL (loop condition)


in_addr_list_node_t *n=NULL;
while((n = LIST_FIRST(syslist(list)))){
if (NULL == n){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

n can never be NULL (loop condition)

mse_array);
assert_true(parse_rc == 0);

char *aux = strdup(mse_input1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to strdup string, process_mse_buffer parameter is const

&decoder_info,
now);

char *aux2 = strdup(mse_input2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for strdup

}

static void checkMSE8_invalid_timestamp(struct mse_array *notifications_array) {
/* No database -> output == input */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete this?

assert(unpack_rc == 0);
assert(0 == strcmp(subscriptionName, "MSE_SanCarlos"));
assert(0 == strcmp(sensor_name, "MSE_testing"));
//assert(0 == strcmp(sensor_name, "MSE_testing"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why delete this check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants