fix: cppcheck
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "toml.h"
|
||||
@@ -10,7 +11,6 @@
|
||||
#include "stellar/session.h"
|
||||
#include "stellar/stellar_mq.h"
|
||||
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
|
||||
#define LOG_ERR(fmt, ...) printf("ERROR [packet inject] " fmt, ##__VA_ARGS__)
|
||||
@@ -431,7 +431,10 @@ static void on_sess_free(struct session *sess, void *sess_ctx, void *plugin_ctx)
|
||||
|
||||
static void on_sess_msg(struct session *sess, int topic_id, const void *msg, void *sess_ctx, void *plugin_ctx)
|
||||
{
|
||||
if(msg==NULL)return;// session closing, return directly
|
||||
if (msg == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
char buffer[1024] = {0};
|
||||
struct packet *pkt = (struct packet *)msg;
|
||||
|
||||
Reference in New Issue
Block a user