Versions Compared

Key

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

...

Code Block
for(p = head; p != NULL; p = p->next) {
  free(p);
}

Compliant Solution 1

...

Code Block
for (p = head; p != NULL; p = p->qq) {
  q = p->next;
  free(p);
}

...

Code Block
int main(int argc, char *argv[]) {
  char *buff;

  buff = (char *) malloc(BUFSIZE);
  if (!buff) {
     /* handle error condition */
  }
  ...
  free(buff);
  ...
  strncpy(buff, argv[1], BUFSIZE-1);
}

...