lib/net : Initialize global TAILQ HEAD variable at definition.
Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: I2cd730957f9d839dd18969d0e9c9261ce0300e66 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4599 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
55478de6e4
commit
cf51adeaae
@ -44,7 +44,7 @@
|
|||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
#include <linux/rtnetlink.h>
|
#include <linux/rtnetlink.h>
|
||||||
|
|
||||||
static TAILQ_HEAD(, spdk_interface) g_interface_head;
|
static TAILQ_HEAD(, spdk_interface) g_interface_head = TAILQ_HEAD_INITIALIZER(g_interface_head);
|
||||||
|
|
||||||
static pthread_mutex_t interface_lock = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t interface_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
@ -458,7 +458,6 @@ spdk_interface_init(void)
|
|||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
TAILQ_INIT(&g_interface_head);
|
|
||||||
rc = prepare_ifc_list();
|
rc = prepare_ifc_list();
|
||||||
if (!rc) {
|
if (!rc) {
|
||||||
rc = get_ifc_ipv4();
|
rc = get_ifc_ipv4();
|
||||||
|
Loading…
Reference in New Issue
Block a user