On Tue, 1 Jul 2008 20:35:41 +0200
Oliver Lehmann <lehmann(a)ans-netz.de> wrote:
Jose R. Valverde wrote:
u.u_dirp.l = (caddr_t) ((long) (((saddr_t)
(uap->linkname).l) & 0x7F00FFFF);
I've added a missing ) behind .l:
u.u_dirp.l = (caddr_t) ((long) (((saddr_t) (uap->linkname).l)) &
0x7F00FFFF);
And I've got:
"sys2.c":305: warning: struct/union or struct/union pointer required
"sys2.c":305: operands of CAST have incompatible types
That looks like the compiler is ignoring the parenthesis... So,
maybe what happened was that the original author also tried several
of these combinations and failed as well, and may be -as I mentioned-
On Tue, 1 Jul 2008 16:21:02 +0200
"Jose R. Valverde" <jrvalverde(a)cnb.csic.es> wrote:
the author faced a difficult to parse
expression and broke it with an auxiliary variable,
saddr_t aux;
aux.l = (caddr_t) uap->linkname;
u.u_dirp.l = (caddr_t) ((long) aux.l & 0x7F00FFFF);
or some such.
j
--
These opinions are mine and only mine. Hey man, I saw them first!
José R. Valverde
De nada sirve la Inteligencia Artificial cuando falta la Natural