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

wrong return value check #518

Closed
veripoolbot opened this issue May 22, 2012 · 2 comments
Closed

wrong return value check #518

veripoolbot opened this issue May 22, 2012 · 2 comments
Assignees

Comments

@veripoolbot
Copy link
Collaborator

@veripoolbot veripoolbot commented May 22, 2012


Author Name: Wei Song
Original Redmine Issue: 518 from https://www.veripool.org
Original Date: 2012-05-22
Original Assignee: Wilson Snyder (@wsnyder)


In VPreProc.cpp:
function VPreProcImp::readWholefile

The "open" function returns -1 when failing to open a file.
However, "if(!fd)" will fail to check the error.

I found this problem as I am directly using the preprocessor in my own project.
Running with the perl wrapper will not show any problem because, to my understanding, perl will first check the file existence.

@veripoolbot

This comment has been minimized.

Copy link
Collaborator Author

@veripoolbot veripoolbot commented May 22, 2012


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-05-22T14:20:58Z


Good point, thanks for reporting it. Fixed in git towards 3.316+.

@veripoolbot

This comment has been minimized.

Copy link
Collaborator Author

@veripoolbot veripoolbot commented Jul 27, 2012


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-07-27T22:51:40Z


In 3.316.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.