ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/network_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/network_stats.c (file contents):
Revision 1.62 by ats, Mon Apr 5 15:40:15 2004 UTC vs.
Revision 1.63 by ats, Mon Apr 5 18:10:11 2004 UTC

# Line 127 | Line 127 | sg_network_io_stats *sg_get_network_io_stats(int *entr
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;
# Line 227 | Line 227 | sg_network_io_stats *sg_get_network_io_stats(int *entr
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  
# Line 334 | Line 334 | sg_network_io_stats *sg_get_network_io_stats_diff(int
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;
# Line 452 | Line 452 | sg_network_iface_stats *sg_get_network_iface_stats(int
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  
# Line 554 | Line 554 | sg_network_iface_stats *sg_get_network_iface_stats(int
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  
# Line 631 | Line 631 | sg_network_iface_stats *sg_get_network_iface_stats(int
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) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines