git: kernel - More fixes to libc's uname

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Mar 31 14:36:44 PDT 2021


commit 95347633b44eb814af09cdb86699f443921bcb5e
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Mar 31 14:34:50 2021 -0700

    kernel - More fixes to libc's uname
    
    * Remove no no-longer-used buf[] (and fix syntax error during
      compilation).
    
    * Do not parse garbage data in buffers in case the sysctls fail.
      This would not have been fatal anyway since we always ensure
      that the buffers are zero-terminated, but it wasn't clean either.
      Clean it up.
    
    * Use the proper name->arrayname for a pointer to the array instead
      of &name->arrayname.  We could also use &name->arrayname[0] but
      just stick with the first method.
    
    Pointed-out-by: dan

Summary of changes:
 lib/libc/gen/uname.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/95347633b44eb814af09cdb86699f443921bcb5e


-- 
DragonFly BSD source repository



More information about the Commits mailing list