Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pkg_install/admin use getcwd() instead of getwd() -...
details: https://anonhg.NetBSD.org/src/rev/c0cbec0f3df4
branches: trunk
changeset: 502033:c0cbec0f3df4
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Wed Jan 10 22:53:22 2001 +0000
description:
use getcwd() instead of getwd() - mainly to avoid link warning, this
particular usage is safe
diffstat:
usr.sbin/pkg_install/admin/main.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 84816bc8d5b7 -r c0cbec0f3df4 usr.sbin/pkg_install/admin/main.c
--- a/usr.sbin/pkg_install/admin/main.c Wed Jan 10 22:42:56 2001 +0000
+++ b/usr.sbin/pkg_install/admin/main.c Wed Jan 10 22:53:22 2001 +0000
@@ -1,8 +1,8 @@
-/* $NetBSD: main.c,v 1.17 2000/12/13 03:17:54 hubertf Exp $ */
+/* $NetBSD: main.c,v 1.18 2001/01/10 22:53:22 jdolecek Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.17 2000/12/13 03:17:54 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.18 2001/01/10 22:53:22 jdolecek Exp $");
#endif
/*
@@ -429,7 +429,7 @@
if (rc == -1)
err(1, "Cannot chdir to %s", _pkgdb_getPKGDB_DIR());
- cwd = getwd(NULL);
+ cwd = getcwd(NULL, 0);
if (findmatchingname(cwd, base, lspattern_fn, cwd) == -1)
errx(1, "Error in findmatchingname(\"%s\", \"%s\", ...)",
cwd, base);
@@ -468,7 +468,7 @@
if (rc == -1)
err(1, "Cannot chdir to %s", _pkgdb_getPKGDB_DIR());
- cwd = getwd(NULL);
+ cwd = getcwd(NULL, 0);
p = findbestmatchingname(cwd, base);
if (p)
printf("%s/%s\n", cwd, p);
Home |
Main Index |
Thread Index |
Old Index