Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/window use offsetof() instead of some strange local ...
details: https://anonhg.NetBSD.org/src/rev/f98f60386611
branches: trunk
changeset: 766430:f98f60386611
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Jun 22 06:22:48 2011 +0000
description:
use offsetof() instead of some strange local hack.
diffstat:
usr.bin/window/window_string.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 4c7845225936 -r f98f60386611 usr.bin/window/window_string.h
--- a/usr.bin/window/window_string.h Wed Jun 22 05:50:47 2011 +0000
+++ b/usr.bin/window/window_string.h Wed Jun 22 06:22:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: window_string.h,v 1.8 2009/04/14 08:50:06 lukem Exp $ */
+/* $NetBSD: window_string.h,v 1.9 2011/06/22 06:22:48 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -62,7 +62,7 @@
EXTERN struct string str_head;
-#define str_offset ((unsigned)str_head.s_data - (unsigned)&str_head)
+#define str_offset offsetof(struct string, s_data)
#define str_stos(s) ((struct string *)((unsigned)(s) - str_offset))
char *str_alloc(size_t);
Home |
Main Index |
Thread Index |
Old Index