summaryrefslogtreecommitdiff
path: root/package/mtr/patches/patch-report_c
blob: bbae19253a69f6da5220f83508ebb82df3ec95ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- mtr-0.75.orig/report.c	2008-09-18 14:40:09.000000000 +0200
+++ mtr-0.75/report.c	2008-10-10 15:05:00.000000000 +0200
@@ -122,7 +122,7 @@ void report_close(void) 
       if (j < 0) continue;
 
       /* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
-      if( index( data_fields[j].format, 'f' ) ) {
+      if( strchr( data_fields[j].format, 'f' ) ) {
         snprintf( buf + len, sizeof(buf), data_fields[j].format,
 		data_fields[j].net_xxx(at) /1000.0 );
       } else {
@@ -201,7 +201,7 @@ void xml_close(void)
       strcat(name, data_fields[j].format);
       strcat(name, "</%s>\n");
       /* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
-      if( index( data_fields[j].format, 'f' ) ) {
+      if( strchr( data_fields[j].format, 'f' ) ) {
 	printf( name,
 		data_fields[j].title,
 		data_fields[j].net_xxx(at) /1000.0,
@@ -280,7 +280,7 @@ void csv_close(void)
       if (j < 0) continue; 
 
       /* 1000.0 is a temporay hack for stats usec to ms, impacted net_loss. */
-      if( index( data_fields[j].format, 'f' ) ) {
+      if( strchr( data_fields[j].format, 'f' ) ) {
 	printf( ", %.2f", data_fields[j].net_xxx(at) / 1000.0);
       } else {
 	printf( ", %d",   data_fields[j].net_xxx(at) );