summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-01-09 14:31:07 +0100
committerChristian Göttsche <cgzones@googlemail.com>2021-01-09 14:31:07 +0100
commit6301d5c1dafe7776796d6fc93d33772d17f28bb1 (patch)
tree136c7aa7aa36175229807dba5fa6ee2960745b7e
parent4979245aa569154897e941867420a94740213689 (diff)
Convert unnecessary static variables
They are not used in any other function and are not used maybe uninitialized.
-rw-r--r--Meter.c5
-rw-r--r--htop.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/Meter.c b/Meter.c
index ad5c1575..714fef25 100644
--- a/Meter.c
+++ b/Meter.c
@@ -292,9 +292,6 @@ static const char* const GraphMeterMode_dotsAscii[] = {
/*20*/":", /*21*/":", /*22*/":"
};
-static const char* const* GraphMeterMode_dots;
-static int GraphMeterMode_pixPerRow;
-
static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
if (!this->drawData) {
@@ -303,6 +300,8 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
GraphData* data = this->drawData;
const int nValues = METER_BUFFER_LEN;
+ const char* const* GraphMeterMode_dots;
+ int GraphMeterMode_pixPerRow;
#ifdef HAVE_LIBNCURSESW
if (CRT_utf8) {
GraphMeterMode_dots = GraphMeterMode_dotsUtf8;
diff --git a/htop.c b/htop.c
index 1ff73c53..00ff1dab 100644
--- a/htop.c
+++ b/htop.c
@@ -93,7 +93,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
.highlightDelaySecs = -1,
};
- static struct option long_opts[] =
+ const struct option long_opts[] =
{
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'V'},

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