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


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
Copy link
Collaborator Author


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
Copy link
Collaborator Author


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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants