Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check the file output error more frequently #247

Merged
merged 4 commits into from
Feb 25, 2015

Conversation

masatake
Copy link
Member

The original code introducing ferror doesn't check errors in endTagsFile, closeTagsFile and writePseudoTag.

if (fclose (TagFile.fp) != 0)
{
error (FATAL | PERROR, "cannot close tag file");
exit (1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error(FATAL) will exit itself, so the exit(1) is dead code. And if didn't, abort_if_ferror() should also exit() then.

… if found

exit(1) is removed as suggested by @b4n.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
fflush can also report a file related error.
So abort_if_ferror should be called after fflush.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
exit(1) is removed as suggested by @b4n.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
masatake added a commit that referenced this pull request Feb 25, 2015
check the file output error more frequently
@masatake masatake merged commit 09f98f0 into universal-ctags:master Feb 25, 2015
@masatake masatake deleted the more-ferror branch February 25, 2015 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants