Reduce stack usage by killing linebuf variable in html_display_cpu_pstates()

Signed-off-by: Sergey Senozhatsky <[email protected]>

---

diff --git a/cpu/cpu.cpp b/cpu/cpu.cpp
index 9112dec..bdf1dd7 100644
--- a/cpu/cpu.cpp
+++ b/cpu/cpu.cpp
@@ -534,7 +534,6 @@ void w_display_cpu_cstates(void)
 void html_display_cpu_pstates(void)
 {
        char buffer[512], buffer2[512];
-       char linebuf[1024];
        unsigned int package, core, cpu;
        int line;
        class abstract_cpu *_package, * _core, * _cpu;
@@ -561,7 +560,6 @@ void html_display_cpu_pstates(void)
 
                        for (line = LEVEL_HEADER; line < 10; line++) {
                                int first = 1;
-                               linebuf[0] = 0;
 
                                if (!_package->has_pstate_level(line))
                                        continue;

_______________________________________________
Discuss mailing list
[email protected]
http://lists.lesswatts.org/listinfo/discuss

Reply via email to