Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: s/BUFSIZ/BUFFER_SIZE/g;

...

Code Block
bgColor#ffcccc
langc
#include <stdio.h>
 
#define BUFFER_SIZE 1024
void func(FILE *file) {
  char buf[BUFSIZBUFFER_SIZE];

  if (fgets(buf, sizeof(buf), file) == NULL) {
    /* Set error flag and continue */
  }

}

...

Code Block
bgColor#ccccff
langc
#include <stdio.h>
 
#define BUFFER_SIZE 1024
void func(FILE *file) {
  char buf[BUFSIZBUFFER_SIZE];

  if (fgets(buf, sizeof(buf), file) == NULL) {
    /* Set error flag and continue */
    *buf = '\0';
  }

}

...