set-nag-hostname.c

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

C
25
字号
#include <errno.h>#include <string.h>#include <glib.h>#include "bionet.h"#include "libbionet-internal.h"void bionet_set_nag_hostname(const char *hostname) {    if (libbionet_nag_hostname != NULL) {        free(libbionet_nag_hostname);        libbionet_nag_hostname = NULL;    }    if (hostname != NULL) {        libbionet_nag_hostname = strdup(hostname);        if (libbionet_nag_hostname == NULL) {            g_log(BIONET_LOG_DOMAIN, G_LOG_LEVEL_ERROR, "out of memory while setting NAG hostname to '%s'", hostname);        }    }}

⌨️ 快捷键说明

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