removed shadow res variable out of the loop


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14528 67ed7778-7388-44ab-90cf-0a291f65f57c
fixed retry logic


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14529 67ed7778-7388-44ab-90cf-0a291f65f57c
check return value of other read too (Coverity)


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14530 67ed7778-7388-44ab-90cf-0a291f65f57c
fixed return code checking logic


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14531 67ed7778-7388-44ab-90cf-0a291f65f57c
fixed indentation (Coverity)


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14532 67ed7778-7388-44ab-90cf-0a291f65f57c
fixed indentation (Coverity)


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14533 67ed7778-7388-44ab-90cf-0a291f65f57c
indent fix (Coverity)


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14534 67ed7778-7388-44ab-90cf-0a291f65f57c
add some braces to make it safer (Coverity)


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14535 67ed7778-7388-44ab-90cf-0a291f65f57c
fixed 2 buffer overrreads (Coverity)


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14536 67ed7778-7388-44ab-90cf-0a291f65f57c
fixed passed size to avoid overwrites (Coverity)


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14537 67ed7778-7388-44ab-90cf-0a291f65f57c
also remove the clear halt calls here, to avoid hangs
on raspberry and usb 3


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14538 67ed7778-7388-44ab-90cf-0a291f65f57c
small off by one problem fixed which was not triggering


git-svn-id: svn+ssh://svn.code.sf.net/p/gphoto/code/trunk@14539 67ed7778-7388-44ab-90cf-0a291f65f57c