summaryrefslogtreecommitdiff
path: root/bin/rmdir
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2016-06-03 23:22:21 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2016-06-03 23:22:21 +0000
commit979cc7c8af69187d18c3cc8f611265dece568b70 (patch)
treecb647a809cd29cd02066cef528a26d64d69125d1 /bin/rmdir
parent94251c93f5643a6f096cf91e1ecee25f11831c0a (diff)
new style overlords say to use continue in empty loops.
this is easier to see and self documenting. ok openbsd
Diffstat (limited to 'bin/rmdir')
-rw-r--r--bin/rmdir/rmdir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/rmdir/rmdir.c b/bin/rmdir/rmdir.c
index 896ba3d5f42..6aaa1e4df2e 100644
--- a/bin/rmdir/rmdir.c
+++ b/bin/rmdir/rmdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmdir.c,v 1.11 2015/10/09 01:37:06 deraadt Exp $ */
+/* $OpenBSD: rmdir.c,v 1.12 2016/06/03 23:22:20 tedu Exp $ */
/* $NetBSD: rmdir.c,v 1.13 1995/03/21 09:08:31 cgd Exp $ */
/*-
@@ -75,7 +75,7 @@ main(int argc, char *argv[])
/* Delete trailing slashes, per POSIX. */
p = *argv + strlen(*argv);
while (--p > *argv && *p == '/')
- ;
+ continue;
*++p = '\0';
if (rmdir(*argv) < 0) {
@@ -96,7 +96,7 @@ rm_path(char *path)
while ((p = strrchr(path, '/')) != NULL) {
/* Delete trailing slashes. */
while (--p > path && *p == '/')
- ;
+ continue;
*++p = '\0';
if (rmdir(path) < 0) {