X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdpdkevents.c;h=064dce162373921e5c88f73ab0d56cae6297297f;hb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec;hp=efb76947abe653b1453a9eb24009311f08a38c54;hpb=af12cc40e48331f8c98294239cef60393218a46d;p=collectd.git diff --git a/src/dpdkevents.c b/src/dpdkevents.c index efb76947..064dce16 100644 --- a/src/dpdkevents.c +++ b/src/dpdkevents.c @@ -129,12 +129,11 @@ static int dpdk_event_keep_alive_shm_open(void) { shm_name); } - char errbuf[ERR_BUF_SIZE]; int fd = shm_open(shm_name, O_RDONLY, 0); if (fd < 0) { ERROR(DPDK_EVENTS_PLUGIN ": Failed to open %s as SHM:%s. Is DPDK KA " "primary application running?", - shm_name, sstrerror(errno, errbuf, sizeof(errbuf))); + shm_name, STRERRNO); return errno; } @@ -166,8 +165,7 @@ static int dpdk_event_keep_alive_shm_open(void) { ec->config.keep_alive.shm = (dpdk_keepalive_shm_t *)mmap( 0, sizeof(*(ec->config.keep_alive.shm)), PROT_READ, MAP_SHARED, fd, 0); if (ec->config.keep_alive.shm == MAP_FAILED) { - ERROR(DPDK_EVENTS_PLUGIN ": Failed to mmap KA SHM:%s", - sstrerror(errno, errbuf, sizeof(errbuf))); + ERROR(DPDK_EVENTS_PLUGIN ": Failed to mmap KA SHM:%s", STRERRNO); close(fd); return errno; } @@ -488,7 +486,6 @@ static void dpdk_events_gauge_submit(const char *plugin_instance, .plugin = DPDK_EVENTS_PLUGIN, .type = "gauge", .meta = NULL}; - sstrncpy(vl.host, hostname_g, sizeof(vl.host)); sstrncpy(vl.plugin_instance, plugin_instance, sizeof(vl.plugin_instance)); sstrncpy(vl.type_instance, type_instance, sizeof(vl.type_instance)); plugin_dispatch_values(&vl);