[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mini-os master] mini-os: console.c: Rename static variable from buf to __print_buf



commit 816701f213678809c48713037d6e1bd459f2927c
Author:     Costin Lupu <costin.lupu@xxxxxxxxx>
AuthorDate: Tue Aug 18 16:44:06 2020 +0300
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Thu Aug 27 13:38:34 2020 +0000

    mini-os: console.c: Rename static variable from buf to __print_buf
    
    lwip soure code also has a static variable called 'buf' in ip_frag.c. This 
can
    get confusing when inspecting the binary (e.g. with objdump or something
    similar). Therefore this patch renames the 'buf' variable used by print()
    function to '__print_buf'.
    
    Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
    Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 console/console.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/console/console.c b/console/console.c
index 9ddae9d..af1a6dd 100644
--- a/console/console.c
+++ b/console/console.c
@@ -122,21 +122,21 @@ void console_print(struct consfront_dev *dev, char *data, 
int length)
 
 void print(int direct, const char *fmt, va_list args)
 {
-    static char   buf[1024];
+    static char __print_buf[1024];
     
-    (void)vsnprintf(buf, sizeof(buf), fmt, args);
+    (void)vsnprintf(__print_buf, sizeof(__print_buf), fmt, args);
 
     if(direct)
     {
-        (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf);
+        (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(__print_buf), 
__print_buf);
         return;
     } else {
 #ifndef CONFIG_USE_XEN_CONSOLE
     if(!console_initialised)
 #endif    
-            (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(buf), buf);
+            (void)HYPERVISOR_console_io(CONSOLEIO_write, strlen(__print_buf), 
__print_buf);
         
-        console_print(NULL, buf, strlen(buf));
+        console_print(NULL, __print_buf, strlen(__print_buf));
     }
 }
 
--
generated by git-patchbot for /home/xen/git/mini-os.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.