summaryrefslogtreecommitdiffstats
path: root/bin/mv
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-07-09 09:24:06 +0000
committerbrian <brian@FreeBSD.org>2001-07-09 09:24:06 +0000
commit8636b161b333b18525b6f5ffc5139079c29c0d63 (patch)
treea109115514a8774e981280efca775db8a410df5b /bin/mv
parentef44874abb9460f2956eba8e3233154af304f5b1 (diff)
downloadFreeBSD-src-8636b161b333b18525b6f5ffc5139079c29c0d63.zip
FreeBSD-src-8636b161b333b18525b6f5ffc5139079c29c0d63.tar.gz
Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
Diffstat (limited to 'bin/mv')
-rw-r--r--bin/mv/mv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index fe1d10d..3c4695e 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -331,7 +331,8 @@ copy(from, to)
int pid, status;
if ((pid = fork()) == 0) {
- execl(_PATH_CP, "mv", vflg ? "-PRpv" : "-PRp", from, to, NULL);
+ execl(_PATH_CP, "mv", vflg ? "-PRpv" : "-PRp", from, to,
+ (char *)NULL);
warn("%s", _PATH_CP);
_exit(1);
}
@@ -349,7 +350,7 @@ copy(from, to)
return (1);
}
if (!(pid = vfork())) {
- execl(_PATH_RM, "mv", "-rf", from, NULL);
+ execl(_PATH_RM, "mv", "-rf", from, (char *)NULL);
warn("%s", _PATH_RM);
_exit(1);
}
OpenPOWER on IntegriCloud