hab-add-node.c

来自「MANTIS是由科罗拉多大学开发的传感器网络嵌入式操作系统。 这是mantis」· C语言 代码 · 共 30 行

C
30
字号
#include <glib.h>#include "bionet-util.h"int bionet_hab_add_node(bionet_hab_t *hab, bionet_node_t *node) {    if (hab == NULL) {        g_log(BIONET_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "bionet_hab_add_node(): NULL HAB passed in");        return -1;    }    if (node == NULL) {        g_log(BIONET_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "bionet_hab_add_node(): NULL Node passed in");        return -1;    }    // FIXME: make sure the node's not in the list yet!    // ok, add the node to the hab's node-list    hab->nodes = g_slist_append(hab->nodes, node);    return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?