Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 69 by [email protected]: Redundant condition: If
availableBytes > 0 in os_win32.c:3461
http://code.google.com/p/vim/issues/detail?id=69
cppcheck static analyzer gives those 2 warnings in os_win32.c (Vim-7.3.566):
[os_win32.c:3461] -> [os_win32.c:3461]: (style) Same expression on both
sides of '&&'.
[os_win32.c:3461]: (style) Redundant condition: If availableBytes > 0, the
comparison availableBytes
Code looks like this:
3460 /* We got real data in the pipe, read it */
3461 while (ret != 0 && availableBytes > 0 && availableBytes > 0)
3462 {
Notice that the same condition is repeated twice in the while (...).
I don't think that anything else was intended here and that the
duplication condition can be simply removed.
Attached patch fixes it (+ some typo corrections).
Attachments:
fix-cppcheck-os_win32.c-7.3.566.patch 1.7 KB
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php