aboutsummaryrefslogtreecommitdiffstats
path: root/HostnameMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-12-07 10:26:01 +0100
committerDaniel Lange <DLange@git.local>2020-12-07 10:26:01 +0100
commit65357c8c46154de4e4eca14075bfe5523bb5fc14 (patch)
tree8f430ee5a0d5de377c4e7c94e47842a27c70d7e8 /HostnameMeter.c
parentf80394a20254938142011855f2954b3f63fe5909 (diff)
downloaddebian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.gz
debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.tar.bz2
debian_htop-65357c8c46154de4e4eca14075bfe5523bb5fc14.zip
New upstream version 3.0.3upstream/3.0.3
Diffstat (limited to 'HostnameMeter.c')
-rw-r--r--HostnameMeter.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/HostnameMeter.c b/HostnameMeter.c
index 60bd812..af8e349 100644
--- a/HostnameMeter.c
+++ b/HostnameMeter.c
@@ -1,27 +1,30 @@
/*
htop - HostnameMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2, see the COPYING file
in the source distribution for its full text.
*/
-#include "HostnameMeter.h"
+#include "config.h" // IWYU pragma: keep
-#include "CRT.h"
+#include "HostnameMeter.h"
#include <unistd.h>
+#include "CRT.h"
+#include "Object.h"
+
-int HostnameMeter_attributes[] = {
+static const int HostnameMeter_attributes[] = {
HOSTNAME
};
-static void HostnameMeter_updateValues(Meter* this, char* buffer, int size) {
+static void HostnameMeter_updateValues(Meter* this, char* buffer, size_t size) {
(void) this;
- gethostname(buffer, size-1);
+ gethostname(buffer, size - 1);
}
-MeterClass HostnameMeter_class = {
+const MeterClass HostnameMeter_class = {
.super = {
.extends = Class(Meter),
.delete = Meter_delete

© 2014-2024 Faster IT GmbH | imprint | privacy policy