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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to