git: truss - Use asprintf instead of malloc+sprintf.

Imre Vadasz ivadasz at crater.dragonflybsd.org
Sat Dec 27 08:40:18 PST 2025


commit c19adc0521dedff177982af58b4422566b84630c
Author: Imre Vadász <imre at vdsz.com>
Date:   Sat Dec 27 17:18:55 2025 +0100

    truss - Use asprintf instead of malloc+sprintf.
    
    * And eliminate redundant "if (a) free(a)" pattern, just free(a) is fine,
      because free() already handles NULL values.

Summary of changes:
 usr.bin/truss/syscalls.c    | 29 ++++++++++-------------------
 usr.bin/truss/x86_64-fbsd.c | 19 ++++++-------------
 2 files changed, 16 insertions(+), 32 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/c19adc0521dedff177982af58b4422566b84630c


-- 
DragonFly BSD source repository


More information about the Commits mailing list