apps/lnewusers.c first sets fp=stdin but then always unconditionally overwrites fp before using with:
84 >-------/ Open the file we're going to look at. / 85 >-------if (file != NULL) { 86 >------->-------fp = fopen(file, "r"); 87 >------->-------if (fp == NULL) { 88 >------->------->-------fprintf(stderr, _("Error opening `%s': %s.\n"), 89 >------->------->------->-------file, strerror(errno)); 90 >------->------->-------return 2; 91 >------->-------} 92 >-------} else { 93 >------->-------fp = stdin; 94 >-------} 95
We can probably drop the else to avoid confusing static analyzers.
Metadata Update from @jhrozek: - Issue assigned to jhrozek
Login to comment on this ticket.