Dear folks, During my recent overhaul of our code I found that rstat_timeval (defined in include/rpcsvc/rstat.h) did the following:
%%% struct rstat_timeval { u_int tv_sec; u_int tv_usec; }; %%% While we have timeval defined as: %%% struct timeval { long tv_sec; suseconds_t tv_usec; }; %%% And we have some potentially incorrect code, which directly cast rstat_timeval* into timeval*, which will finally cause some wasted data overwritten on other places. Is there any reason rstat_timeval is not an alias of timeval? Is this for backward compatibility or inter-operation with other operating systems? Thanks in advance! Cheers, -- Xin LI <delphij delphij net> http://www.delphij.net/
signature.asc
Description: =?UTF-8?Q?=E8=BF=99=E6=98=AF=E4=BF=A1=E4=BB=B6=E7=9A=84=E6=95=B0?= =?UTF-8?Q?=E5=AD=97=E7=AD=BE=E5=90=8D=E9=83=A8?= =?UTF-8?Q?=E5=88=86?=