Re: backtrace(3): Inconsistency and missing indentation

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

 



On 02/24/2016 10:26 AM, Martin Gebert wrote:
> In the example section of the page the following snippet is given:
> 
> --8><--
>         void
>         myfunc3(void)
>         {
>             int j, nptrs;
>         #define SIZE 100
>             void *buffer[100];
>             char **strings;
> 
>             nptrs = backtrace(buffer, SIZE);
> --><8--
> 
> Problems:
> 
>  1. "#define SIZE 100" is not indented correctly.
>  2. SIZE should also be used for the buffer array size.

Thanks, Martin. Fixed as below.

Cheers,

Michael

diff --git a/man3/backtrace.3 b/man3/backtrace.3
index afca93d..064b970 100644
--- a/man3/backtrace.3
+++ b/man3/backtrace.3
@@ -215,8 +215,8 @@ void
 myfunc3(void)
 {
     int j, nptrs;
-#define SIZE 100
-    void *buffer[100];
+    const int SIZE = 100;
+    void *buffer[SIZE];
     char **strings;
 
     nptrs = backtrace(buffer, SIZE);



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux