Date: Fri, 26 May 2000 11:01:35 +0200 From: Johan Karlsson <k@numeri.campus.luth.se> To: Alexander Langer <alex@big.endian.de> Cc: hackers@FreeBSD.ORG Subject: Re: review request: truncate(1) Message-ID: <200005260901.LAA19351@numeri.campus.luth.se> In-Reply-To: Your message of "Thu, 25 May 2000 16:52:43 %2B0200." <20000525165243.A84651@cichlids.cichlids.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi again, I found your updated version and I look good. However, I just realised that I would get ride of the modeset variable by moving the default assignment of mode to the begining. /Johan K --- truncate.c.orig Fri May 26 10:34:54 2000 +++ truncate.c Fri May 26 10:37:52 2000 @@ -46,8 +46,9 @@ int fd; int optch; mode_t mode, *modp; - int modeset = 0; + mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; + while ((optch = getopt(argc, argv, "hm:")) != -1) switch (optch) { case 'h': @@ -59,7 +60,6 @@ umask(0); mode = getmode(modp, 0); free(modp); - modeset = 1; break; case '?': default: @@ -74,8 +74,6 @@ usage(); exit(1); } - if (!modeset) - mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; size = atol(*argv++); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005260901.LAA19351>