diff options
author | Andrew Tridgell <tridge@samba.org> | 1999-07-18 07:34:19 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1999-07-18 07:34:19 +0000 |
commit | 5499ad7867bf1f27dfcb1502715bb5ffab585c8d (patch) | |
tree | 592220afdf03cc7a4a00f5d6c89eab993e637737 | |
parent | 8030196116927d3c3d1a216a841c439ba1581ba3 (diff) | |
download | samba-5499ad7867bf1f27dfcb1502715bb5ffab585c8d.tar.gz samba-5499ad7867bf1f27dfcb1502715bb5ffab585c8d.tar.xz samba-5499ad7867bf1f27dfcb1502715bb5ffab585c8d.zip |
rearranged name_ptr() to avoid a egcs bug, simplifying the code at the
same time. (thanks to hel@admin.de)
-rw-r--r-- | source/lib/util.c | 6 |
1 files changed, 1 insertions, 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); } |