1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-09-29 21:49:07 +00:00

fix type-punning warnings with -fstrict-aliasing (active with gcc-4.1 -O2)

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@698 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2006-09-01 17:00:53 +00:00
parent 681fb80260
commit 40f78b11c4

View File

@ -827,9 +827,9 @@ void update_tcp_port_monitor_collection(
/* read all tcp connections */
while (fgets (buf, sizeof (buf), fp) != NULL) {
if ( sscanf (buf, "%*d: %lx:%hx %lx:%hx %lx %*x:%*x %*x:%*x %*x %lu %*d %lu",
(unsigned long *)&conn.local_addr, &conn.local_port,
(unsigned long *)&conn.remote_addr, &conn.remote_port,
if ( sscanf (buf, "%*d: %x:%hx %x:%hx %lx %*x:%*x %*x:%*x %*x %lu %*d %lu",
(unsigned int *)&conn.local_addr, &conn.local_port,
(unsigned int *)&conn.remote_addr, &conn.remote_port,
(unsigned long *)&state, (unsigned long *)&uid, (unsigned long *)&inode) != 7 )
fprintf( stderr, "/proc/net/tcp: bad file format\n" );