summaryrefslogtreecommitdiffstats
path: root/kcontrol/info/memory_fbsd.cpp
diff options
context:
space:
mode:
authorDenis Kozadaev <[email protected]>2024-02-29 09:40:49 +0300
committerSlávek Banko <[email protected]>2024-02-29 10:32:38 +0100
commit8db3aae91c8169cfbd34939c506d8894c9746683 (patch)
tree03c721234a155c56e4a6b9a1bea595a51caf3594 /kcontrol/info/memory_fbsd.cpp
parent10639b722fa3d3ffa1f55b762cf91424f92dbf37 (diff)
downloadtdebase-8db3aae91c8169cfbd34939c506d8894c9746683.tar.gz
tdebase-8db3aae91c8169cfbd34939c506d8894c9746683.zip
kcontrol-info-memory: use 64 bits variable to store memory size
Signed-off-by: Denis Kozadaev <[email protected]> (cherry picked from commit 220dec20f9df8117a09b29571d3dab0d02997790)
Diffstat (limited to 'kcontrol/info/memory_fbsd.cpp')
-rw-r--r--kcontrol/info/memory_fbsd.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/kcontrol/info/memory_fbsd.cpp b/kcontrol/info/memory_fbsd.cpp
index 80a28749e..f307563f3 100644
--- a/kcontrol/info/memory_fbsd.cpp
+++ b/kcontrol/info/memory_fbsd.cpp
@@ -11,9 +11,9 @@
void KMemoryWidget::update()
{
- char blah[10], buf[80], *used_str, *total_str;
+ char buf[80], *used_str, *total_str;
/* Stuff for sysctl */
- int memory;
+ unsigned long memory;
size_t len;
/* Stuff for swap display */
int used, total, _free;
@@ -22,7 +22,6 @@ void KMemoryWidget::update()
len=sizeof(memory);
sysctlbyname("hw.physmem", &memory, &len, NULL, 0);
- snprintf(blah, 10, "%d", memory);
// Numerical values
// total physical memory (without swap space)