git: sbin/hammer: Make rel_buffer() and rel_volume() check if arg is NULL

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Mar 28 15:31:30 PDT 2015


commit 3c6df2848cf5f7a5286f6cba419f1657e5ff1bea
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Thu Mar 26 21:59:03 2015 +0900

    sbin/hammer: Make rel_buffer() and rel_volume() check if arg is NULL
    
    - Some of the existing code do "if (buf) { rel_buffer(buf); }",
      but others just do "rel_buffer(buf);". Make code and things clear
      by making these rel_buffer() and rel_volume() check if the pointer
      is NULL.

Summary of changes:
 sbin/hammer/blockmap.c     |  9 +++------
 sbin/hammer/cmd_blockmap.c |  6 ++----
 sbin/hammer/cmd_recover.c  |  6 ++----
 sbin/hammer/cmd_show.c     |  9 +++------
 sbin/hammer/ondisk.c       | 25 ++++++++++---------------
 5 files changed, 20 insertions(+), 35 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3c6df2848cf5f7a5286f6cba419f1657e5ff1bea


-- 
DragonFly BSD source repository



More information about the Commits mailing list