author | Ruben Kerkhof <ruben@tilaa.nl> | |
Fri, 4 Mar 2016 11:15:49 +0000 (12:15 +0100) | ||
committer | Ruben Kerkhof <ruben@tilaa.nl> | |
Fri, 4 Mar 2016 11:15:49 +0000 (12:15 +0100) |
Turbostat: fix a few old-style prototypes
src/ceph.c | patch | blob | history | |
src/turbostat.c | patch | blob | history |
diff --git a/src/ceph.c b/src/ceph.c
index 251def9cd66ae1f21dd23c13eafd827f9f9fd0f0..9c53a3e76590e1ba490c83e24c26551815c935cf 100644 (file)
--- a/src/ceph.c
+++ b/src/ceph.c
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if(fd < 0)
{
- int err = -errno;
+ err = -errno;
ERROR("ceph plugin: cconn_connect: socket(PF_UNIX, SOCK_STREAM, 0) "
"failed: error %d", err);
return err;
}
else
{
- int ret = cconn_handle_event(io);
+ ret = cconn_handle_event(io);
if(ret)
{
WARNING("ceph plugin: cconn_handle_event(name=%s,"
diff --git a/src/turbostat.c b/src/turbostat.c
index e17e0c2cd31f5b3b1b00624be3d4657a7e400e12..fc1b5dccc0dd3c4b2c2c848b1de1f9a57c95c156 100644 (file)
--- a/src/turbostat.c
+++ b/src/turbostat.c
@@ -457,7 +457,7 @@ delta_core(struct core_data *delta, const struct core_data *new, const struct co
*/
static inline int __attribute__((warn_unused_result))
delta_thread(struct thread_data *delta, const struct thread_data *new, const struct thread_data *old,
- const struct core_data *core_delta)
+ const struct core_data *cdelta)
{
delta->tsc = new->tsc - old->tsc;
@@ -491,12 +491,12 @@ delta_thread(struct thread_data *delta, const struct thread_data *new, const str
* it is possible for mperf's non-halted cycles + idle states
* to exceed TSC's all cycles: show c1 = 0% in that case.
*/
- if ((delta->mperf + core_delta->c3 + core_delta->c6 + core_delta->c7) > delta->tsc)
+ if ((delta->mperf + cdelta->c3 + cdelta->c6 + cdelta->c7) > delta->tsc)
delta->c1 = 0;
else {
/* normal case, derive c1 */
- delta->c1 = delta->tsc - delta->mperf - core_delta->c3
- - core_delta->c6 - core_delta->c7;
+ delta->c1 = delta->tsc - delta->mperf - cdelta->c3
+ - cdelta->c6 - cdelta->c7;
}
if (delta->mperf == 0) {