Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/gen don't do arithmetic on void pointer.



details:   https://anonhg.NetBSD.org/src/rev/398608ce026b
branches:  trunk
changeset: 778215:398608ce026b
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 19 16:20:58 2012 +0000

description:
don't do arithmetic on void pointer.

diffstat:

 lib/libc/gen/nlist_ecoff.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r fa9d1d42b527 -r 398608ce026b lib/libc/gen/nlist_ecoff.c
--- a/lib/libc/gen/nlist_ecoff.c        Mon Mar 19 13:07:23 2012 +0000
+++ b/lib/libc/gen/nlist_ecoff.c        Mon Mar 19 16:20:58 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nlist_ecoff.c,v 1.19 2012/03/18 14:34:28 christos Exp $ */
+/* $NetBSD: nlist_ecoff.c,v 1.20 2012/03/19 16:20:58 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: nlist_ecoff.c,v 1.19 2012/03/18 14:34:28 christos Exp $");
+__RCSID("$NetBSD: nlist_ecoff.c,v 1.20 2012/03/19 16:20:58 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -157,8 +157,8 @@
                        if (*nlistname == '_')
                                nlistname++;
 
-                       symtabname =
-                           &mappedfile[extstroff + esyms[i].es_strindex];
+                       symtabname = (void *)((char *)
+                           mappedfile + (extstroff + esyms[i].es_strindex));
 
                        if (!strcmp(symtabname, nlistname)) {
                                /*



Home | Main Index | Thread Index | Old Index