127 |
|
network_stat_ptr=network_stats+interfaces; |
128 |
|
|
129 |
|
if (sg_update_string(&network_stat_ptr->interface_name, |
130 |
< |
net_ptr->ifa_name) == NULL) { |
130 |
> |
net_ptr->ifa_name) < 0) { |
131 |
|
return NULL; |
132 |
|
} |
133 |
|
net_data=(struct if_data *)net_ptr->ifa_data; |
227 |
|
|
228 |
|
/* Read interface name */ |
229 |
|
if (sg_update_string(&network_stat_ptr->interface_name, |
230 |
< |
ksp->ks_name) == NULL) { |
230 |
> |
ksp->ks_name) < 0) { |
231 |
|
return NULL; |
232 |
|
} |
233 |
|
|
334 |
|
dest = &diff[i]; |
335 |
|
|
336 |
|
if (sg_update_string(&dest->interface_name, |
337 |
< |
src->interface_name) == NULL) { |
337 |
> |
src->interface_name) < 0) { |
338 |
|
return NULL; |
339 |
|
} |
340 |
|
dest->rx = src->rx; |
452 |
|
} |
453 |
|
|
454 |
|
if (sg_update_string(&network_iface_stat_ptr->interface_name, |
455 |
< |
net_ptr->ifa_name) == NULL) { |
455 |
> |
net_ptr->ifa_name) < 0) { |
456 |
|
return NULL; |
457 |
|
} |
458 |
|
|
554 |
|
ifaces++; |
555 |
|
|
556 |
|
if (sg_update_string(&network_iface_stat_ptr->interface_name, |
557 |
< |
ksp->ks_name) == NULL) { |
557 |
> |
ksp->ks_name) < 0) { |
558 |
|
return NULL; |
559 |
|
} |
560 |
|
|
631 |
|
network_iface_stat_ptr = network_iface_stats + ifaces; |
632 |
|
|
633 |
|
if (sg_update_string(&network_iface_stat_ptr->interface_name, |
634 |
< |
name) == NULL) { |
634 |
> |
name) < 0) { |
635 |
|
return NULL; |
636 |
|
} |
637 |
|
if ((ifr.ifr_flags & IFF_UP) != 0) { |