Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt handle constness



details:   https://anonhg.NetBSD.org/src/rev/246a30a67048
branches:  trunk
changeset: 333810:246a30a67048
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Mon Nov 17 07:13:42 2014 +0000

description:
handle constness

diffstat:

 sbin/gpt/gpt.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r b795ba5f4872 -r 246a30a67048 sbin/gpt/gpt.c
--- a/sbin/gpt/gpt.c    Mon Nov 17 07:11:18 2014 +0000
+++ b/sbin/gpt/gpt.c    Mon Nov 17 07:13:42 2014 +0000
@@ -35,7 +35,7 @@
 __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $");
 #endif
 #ifdef __RCSID
-__RCSID("$NetBSD: gpt.c,v 1.37 2014/11/17 07:11:18 mlelstv Exp $");
+__RCSID("$NetBSD: gpt.c,v 1.38 2014/11/17 07:13:42 mlelstv Exp $");
 #endif
 
 #include <sys/param.h>
@@ -563,7 +563,8 @@
 
        mode = readonly ? O_RDONLY : O_RDWR|O_EXCL;
 
-       device_arg = device_name = dev;
+       device_arg = dev;
+       device_name = __UNCONST(device_arg);
        fd = opendisk(dev, mode, device_path, sizeof(device_path), 0);
        if (fd == -1)
                return -1;



Home | Main Index | Thread Index | Old Index