Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFCCCC
int string_loop(char *str) {
    size_t i;
    size_t len = strlen(str);
    for (i=0; i < strlen(str)len; i++) {
        /* ... */
	if (str[i] == '\0')
	    /* This code is never reached */
    }
    return 0;
}

...

Code Block
bgColor#ccccff
int string_loop(char *str) {
    size_t i;
    size_t len = strlen(str);
    for (i=0; i < strlen(str)len; i++) {
        /* ... */
	if (str[i+1] == '\0')
	    /* This code is now reached */
    }
    return 0;
}

...