Source-Changes-HG archive

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

[src/trunk]: src/distrib/utils/libhack Make this no-op variant of fmtcheck() ...



details:   https://anonhg.NetBSD.org/src/rev/d9677144f3b0
branches:  trunk
changeset: 365215:d9677144f3b0
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 14 15:51:29 2022 +0000

description:
Make this no-op variant of fmtcheck() compatible with the libc version
when called with NULL as first argument.

diffstat:

 distrib/utils/libhack/fmtcheck.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (13 lines):

diff -r 69591febbc00 -r d9677144f3b0 distrib/utils/libhack/fmtcheck.c
--- a/distrib/utils/libhack/fmtcheck.c  Thu Apr 14 15:48:31 2022 +0000
+++ b/distrib/utils/libhack/fmtcheck.c  Thu Apr 14 15:51:29 2022 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: fmtcheck.c,v 1.1 2019/06/22 22:50:39 christos Exp $    */
+/*     $NetBSD: fmtcheck.c,v 1.2 2022/04/14 15:51:29 martin Exp $      */
 #include <stdio.h>
 const char *
 fmtcheck(const char *a, const char *b)
 {
-       return a;
+       return a ? a : b;
 }



Home | Main Index | Thread Index | Old Index