mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +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:
parent
681fb80260
commit
40f78b11c4
@ -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" );
|
||||
|
Loading…
Reference in New Issue
Block a user