History Of Ticket a09798ba9e
Not logged in
Ticket change [4e3db166e8] (rid 5777) by drh on 2009-12-29 20:53:21:
  1. Appended to comment:

    drh added on 2009-12-29 20:53:21:
    See check-in 5d16ca43f192.

  2. Change resolution to "Fixed"
  3. Change status to "Fixed"
Ticket change [a12aadd18c] (rid 5770) by rwilson on 2009-12-29 18:16:42:
  1. Appended to comment:

    rwilson added on 2009-12-29 18:16:42:
    i think you are correct. it should be i. as is, this code will always return the first two chars of the ip address.

    static char *ipPrefix(const char *zIP){
      int i, j;
      for(i=j=0; zIP[bad-link: i]i; i++){
        if( zIP[bad-link: i]i=='.' ){
          j++;
          if( j==2 ) break;
        }
      }
      return mprintf("%.*s", j, zIP);
    }
    
  2. Change resolution to "Open"
Ticket change [f3c1440ba9] (rid 5769) by anonymous on 2009-12-29 13:49:30:
  1. Change comment to "You sure that return mprintf("%.*s", j, zIP); is correct? It's been a long time having programmed in C, but I think you should use i instead of j (j will be 2 at most)."
  2. Change foundin to "c5e94568c7"
  3. Change status to "Open"
  4. Change title to "Bug in ipPrefix (Check-in [86cbb69af2])?"
  5. Change type to "Code_Defect"