1
0

patch-report_c 1.3 KB

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