Ignore:
Timestamp:
Mar 15, 2011 5:09:29 AM (13 years ago)
Author:
ming
Message:

Misc (re #1175) (thanks to Seth Hinze for the patch):

  • uri_test: Fixes a divide by zero error when the benchmark is run on a really fast machine.
  • presence: Fixes a compiler warning about potential referencing of an uninitialized variable.
  • echo_speex: Allow for compilation when PJMEDIA_HAS_SPEEX_AEC is not defined.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/test/uri_test.c

    r2660 r3443  
    953953    pj_highprec_mul(avg_parse, AVERAGE_URL_LEN); 
    954954    pj_highprec_div(avg_parse, var.parse_len); 
     955    if (avg_parse == 0) 
     956        avg_parse = 1; 
    955957    avg_parse = 1000000 / avg_parse; 
    956958 
     
    970972    pj_highprec_mul(avg_print, AVERAGE_URL_LEN); 
    971973    pj_highprec_div(avg_print, var.parse_len); 
     974    if (avg_print == 0) 
     975        avg_print = 1; 
    972976    avg_print = 1000000 / avg_print; 
    973977 
     
    987991    pj_highprec_mul(avg_cmp, AVERAGE_URL_LEN); 
    988992    pj_highprec_div(avg_cmp, var.cmp_len); 
     993    if (avg_cmp == 0) 
     994        avg_cmp = 1; 
    989995    avg_cmp = 1000000 / avg_cmp; 
    990996 
Note: See TracChangeset for help on using the changeset viewer.