From 5499ad7867bf1f27dfcb1502715bb5ffab585c8d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 18 Jul 1999 07:34:19 +0000 Subject: rearranged name_ptr() to avoid a egcs bug, simplifying the code at the same time. (thanks to hel@admin.de) --- source/lib/util.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/lib/util.c b/source/lib/util.c index 2de718327f8..90ef035a83b 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -1043,11 +1043,7 @@ static char *name_ptr(char *buf,int ofs) if ((c & 0xC0) == 0xC0) { - uint16 l; - char p[2]; - memcpy(p,buf+ofs,2); - p[0] &= ~0xC0; - l = RSVAL(p,0); + uint16 l = RSVAL(buf, ofs) & 0x3FFF; DEBUG(5,("name ptr to pos %d from %d is %s\n",l,ofs,buf+l)); return(buf + l); } -- cgit