Nuke 'sectoffset'. A stub variable no longer used except to supply
authorkrw <krw@openbsd.org>
Tue, 27 Jul 2010 00:07:26 +0000 (00:07 +0000)
committerkrw <krw@openbsd.org>
Tue, 27 Jul 2010 00:07:26 +0000 (00:07 +0000)
the value 0 to one function call. Use 0 there, eliminate the
variable and the pointless verbose verbiage that always displayed
the same value.

ok deraadt@ matthew@

sbin/disklabel/disklabel.c

index 8106f1d..6b1e24d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: disklabel.c,v 1.166 2010/06/30 23:44:06 halex Exp $   */
+/*     $OpenBSD: disklabel.c,v 1.167 2010/07/27 00:07:26 krw Exp $     */
 
 /*
  * Copyright (c) 1987, 1993
@@ -363,7 +363,6 @@ writelabel(int f, char *boot, struct disklabel *lp)
 {
 #if NUMBOOT > 0
        int writeable;
-       off_t sectoffset = 0;
 #endif
 
 #if NUMBOOT > 0
@@ -390,12 +389,8 @@ writelabel(int f, char *boot, struct disklabel *lp)
                                return (1);
                        }
                }
-               if (verbose)
-                       printf("writing label to block %lld (0x%qx)\n",
-                           (long long)sectoffset/DEV_BSIZE,
-                           (long long)sectoffset/DEV_BSIZE);
                if (!donothing) {
-                       if (lseek(f, sectoffset, SEEK_SET) < 0) {
+                       if (lseek(f, 0, SEEK_SET) < 0) {
                                perror("lseek");
                                return (1);
                        }