• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // commit: 5efc6af4ebb9d50eb978d0338835544fdfea0396 2011-04-25
2 // scanf misreports literal match as input failure when reading EOF (null for sscanf)
3 #include <stdio.h>
4 #include "test.h"
5 
main(void)6 int main(void)
7 {
8 	char buf[] = { 0 };
9 	int match_count;
10 
11 	match_count = sscanf(buf, "a");
12 	if(match_count != EOF)
13 		t_error("scanf reported match failure instead of input failure on literal EOF match\n");
14 
15 	return t_status;
16 }
17