X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Flpar.c;h=c4189b7d32ae035da5122cd36570a6eec05efe0a;hb=0b7cd83a5e6bac068ea83a88a5ddcfb07c09fbec;hp=a0dde32c9ace7b88141fcfe1e0db175b29173d12;hpb=6026e3162e522b133d10596710527d24c2921b55;p=collectd.git diff --git a/src/lpar.c b/src/lpar.c index a0dde32c..c4189b7d 100644 --- a/src/lpar.c +++ b/src/lpar.c @@ -76,9 +76,8 @@ static int lpar_init(void) { sizeof(perfstat_partition_total_t), /* number = */ 1 /* (must be 1) */); if (status != 1) { - char errbuf[1024]; - ERROR("lpar plugin: perfstat_partition_total failed: %s (%i)", - sstrerror(errno, errbuf, sizeof(errbuf)), status); + ERROR("lpar plugin: perfstat_partition_total failed: %s (%i)", STRERRNO, + status); return -1; } @@ -138,9 +137,8 @@ static int lpar_read(void) { &lparstats, sizeof(perfstat_partition_total_t), /* number = */ 1 /* (must be 1) */); if (status != 1) { - char errbuf[1024]; - ERROR("lpar plugin: perfstat_partition_total failed: %s (%i)", - sstrerror(errno, errbuf, sizeof(errbuf)), status); + ERROR("lpar plugin: perfstat_partition_total failed: %s (%i)", STRERRNO, + status); return -1; } @@ -226,10 +224,10 @@ static int lpar_read(void) { if (pool_busy_cpus < 0.0) pool_busy_cpus = 0.0; - ssnprintf(typinst, sizeof(typinst), "pool-%X-busy", lparstats.pool_id); + snprintf(typinst, sizeof(typinst), "pool-%X-busy", lparstats.pool_id); lpar_submit(typinst, pool_busy_cpus); - ssnprintf(typinst, sizeof(typinst), "pool-%X-idle", lparstats.pool_id); + snprintf(typinst, sizeof(typinst), "pool-%X-idle", lparstats.pool_id); lpar_submit(typinst, pool_idle_cpus); }