Module Name: src
Committed By: martin
Date: Tue Apr 25 15:33:22 UTC 2023
Modified Files:
src/usr.bin/resize [netbsd-10]: resize.h
Log Message:
Pull up following revision(s) (requested by gutteridge in ticket #147):
usr.bin/resize/resize.h: revision 1.3
resize.c: use estrdup(3) with basename(3)
basename(3) is invoked more than once on different paths. Retain the
correct name for the utility itself on error. Addresses PR bin/57355
from RVP, who provided the patch.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 src/usr.bin/resize/resize.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/resize/resize.h
diff -u src/usr.bin/resize/resize.h:1.2 src/usr.bin/resize/resize.h:1.2.6.1
--- src/usr.bin/resize/resize.h:1.2 Sun Feb 28 00:44:58 2021
+++ src/usr.bin/resize/resize.h Tue Apr 25 15:33:22 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: resize.h,v 1.2 2021/02/28 00:44:58 christos Exp $ */
+/* $NetBSD: resize.h,v 1.2.6.1 2023/04/25 15:33:22 martin Exp $ */
/*-
* Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
#define TTYSIZE_COLS(ws) (ws).ws_col
#define SET_TTYSIZE(fd, ws) ioctl((fd), TIOCSWINSZ, &(ws))
-#define x_basename(a) basename(a)
+#define x_basename(a) estrdup(basename(a))
#define x_strdup(a) estrdup(a)
#define x_getenv(a) getenv(a)
#define x_getlogin(u, p) __nothing