Menu

#8 inefficient for() loop test in UtilCleanArgs()

_v0.0.7
open-fixed
None
5
2007-09-04
2007-08-26
Anonymous
No

UtilCleanArgs() function calls strlen() in the test condition of a for(;;) loop. The is very
inefficient. I suggest the following:

for(j=0; argv[i][j]; j++)
{
// Check for quote

Discussion

  • Peter Dons Tychsen

    Logged In: YES
    user_id=760114
    Originator: NO

    Good comment.
    Will be changed for v0.0.8

     
  • Peter Dons Tychsen

    • status: open --> open-accepted
     
  • Peter Dons Tychsen

    • milestone: --> _v0.0.7
    • status: open-accepted --> open-fixed
     
  • Peter Dons Tychsen

    • assigned_to: nobody --> donpedro2
     

Log in to post a comment.

MongoDB Logo MongoDB