summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2002-08-05 17:34:15 +0000
committeryar <yar@FreeBSD.org>2002-08-05 17:34:15 +0000
commitdbe59dc02994a6f107374fe988a92b945d4fb566 (patch)
tree3214f0cd06dbd3faf01d9fca83ca0af4088432c2 /libexec
parent5020fa3b22a26f1925f59f38b10cdd53d56e8b47 (diff)
downloadFreeBSD-src-dbe59dc02994a6f107374fe988a92b945d4fb566.zip
FreeBSD-src-dbe59dc02994a6f107374fe988a92b945d4fb566.tar.gz
1) Use "pathstring" instead of "STRING" consistently.
2) Remove unneeded "if not NULL" props from "pathstring", which will never be NULL by the lexer design. Inspired by: OpenBSD MFC after: 1 week
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpcmd.y12
1 files changed, 5 insertions, 7 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index dbb6951..9266a2e 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -475,12 +475,11 @@ cmd
if ($2)
send_file_list(".");
}
- | NLST check_login SP STRING CRLF
+ | NLST check_login SP pathstring CRLF
{
- if ($2 && $4 != NULL)
+ if ($2)
send_file_list($4);
- if ($4 != NULL)
- free($4);
+ free($4);
}
| LIST check_login CRLF
{
@@ -489,10 +488,9 @@ cmd
}
| LIST check_login SP pathstring CRLF
{
- if ($2 && $4 != NULL)
+ if ($2)
retrieve("/bin/ls -lgA %s", $4);
- if ($4 != NULL)
- free($4);
+ free($4);
}
| STAT check_login SP pathname CRLF
{
OpenPOWER on IntegriCloud