diff options
Diffstat (limited to 'usr.sbin/pkg_install/lib/pen.c')
-rw-r--r-- | usr.sbin/pkg_install/lib/pen.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c index 835a044e6c7..e31c8ff8fce 100644 --- a/usr.sbin/pkg_install/lib/pen.c +++ b/usr.sbin/pkg_install/lib/pen.c @@ -1,7 +1,7 @@ -/* $OpenBSD: pen.c,v 1.4 1997/06/17 08:39:47 deraadt Exp $ */ +/* $OpenBSD: pen.c,v 1.5 1997/07/14 14:13:17 graichen Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: pen.c,v 1.4 1997/06/17 08:39:47 deraadt Exp $"; +static const char *rcsid = "$OpenBSD: pen.c,v 1.5 1997/07/14 14:13:17 graichen Exp $"; #endif /* @@ -90,10 +90,14 @@ make_playpen(char *pen, size_t sz) umask(um); return NULL; } - if (mkdir(pen, 0755) == FAIL && i++ < 100) { - /* try again! */ - continue; - } + + if (mkdir(pen, 0755) == FAIL) { + if (i++ < 100) { + /* try again! */ + continue; + } + } else + break; barf("Can't mkdir '%s'.", pen); umask(um); |