common: Reset buffer length correctly when zero length read
common: Reset buffer length correctly when zero length read

Reviewed-by: Marius Vollmer <bb11c6e942c5cc765df5f04da146b3198127a7a3@redhat.com>

maxamillion/cockpit,jscotka/cockpit,zigitax/cockpit,netzvieh/cockpit,larskarlitski/cockpit,moraleslazaro/cockpit,SotolitoLabs/cockpit,deryni/cockpit,firebitsbr/cockpit,mareklibra/cockpit,mvollmer/cockpit,garrett/cockpit,Scribery/cockpit,xhad/cockpit,sgallagher/cockpit,fridex/cockpit,denysvitali/cockpit,vbatts/cockpit,matobet/cockpit,haiyangd/cockpit_view,andreasn/cockpit,FireDrunk/cockpit,haiyangd/cockpit_view,FireDrunk/cockpit,jscotka/cockpit,petervo/cockpit,cockpituous/cockpit,harishanand95/cockpit,nmav/cockpit,stefwalter/cockpit,netzvieh/cockpit,Armstrong1992/cockpit,zigitax/cockpit,Armstrong1992/cockpit,larsu/cockpit,moraleslazaro/cockpit,matobet/cockpit,nmav/cockpit,petervo/cockpit,vanloswang/cockpit,martinpitt/cockpit,haiyangd/cockpit_view,vanloswang/cockpit,SotolitoLabs/cockpit,dperpeet/cockpit,Thermionix/cockpit,harishanand95/cockpit,netzvieh/cockpit,dperpeet/cockpit,michalskrivanek/cockpit,cockpituous/cockpit,larskarlitski/cockpit,FireDrunk/cockpit,denysvitali/cockpit,cockpit-project/cockpit,mareklibra/cockpit,andreasn/cockpit,darioajr/cockpit,larsu/cockpit,arilivigni/cockpit,harishanand95/cockpit,nmav/cockpit,sgallagher/cockpit,Thermionix/cockpit,moraleslazaro/cockpit,mareklibra/cockpit,SotolitoLabs/cockpit,stefwalter/cockpit,stefwalter/cockpit,fridex/cockpit,Scribery/cockpit,vbatts/cockpit,vbatts/cockpit,mvollmer/cockpit,SotolitoLabs/cockpit,denysvitali/cockpit,moolitayer/cockpit,jscotka/cockpit,Scribery/cockpit,harishanand95/cockpit,evol262/cockpit,fridex/cockpit,Thermionix/cockpit,garrett/cockpit,FireDrunk/cockpit,michalskrivanek/cockpit,zigitax/cockpit,fridex/cockpit,cockpit-project/cockpit,michalskrivanek/cockpit,andreasn/cockpit,larskarlitski/cockpit,andreasn/cockpit,jscotka/cockpit,garrett/cockpit,petervo/cockpit,vanloswang/cockpit,arilivigni/cockpit,arilivigni/cockpit,martinpitt/cockpit,harishanand95/cockpit,deryni/cockpit,Scribery/cockpit,michalskrivanek/cockpit,petervo/cockpit,arilivigni/cockpit,michalskrivanek/cockpit,xhad/cockpit,petervo/cockpit,denysvitali/cockpit,moolitayer/cockpit,larskarlitski/cockpit,evol262/cockpit,SotolitoLabs/cockpit,deryni/cockpit,mareklibra/cockpit,moraleslazaro/cockpit,michalskrivanek/cockpit,larsu/cockpit,dperpeet/cockpit,moraleslazaro/cockpit,matobet/cockpit,stefwalter/cockpit,evol262/cockpit,cockpit-project/cockpit,petervo/cockpit,larsu/cockpit,evol262/cockpit,arilivigni/cockpit,sgallagher/cockpit,nmav/cockpit,netzvieh/cockpit,moraleslazaro/cockpit,vbatts/cockpit,moolitayer/cockpit,larsu/cockpit,mvollmer/cockpit,vbatts/cockpit,harishanand95/cockpit,Thermionix/cockpit,dperpeet/cockpit,fridex/cockpit,dperpeet/cockpit,dperpeet/cockpit,jscotka/cockpit,larskarlitski/cockpit,larsu/cockpit,darioajr/cockpit,arilivigni/cockpit,Thermionix/cockpit,andreasn/cockpit,mareklibra/cockpit,sgallagher/cockpit,stefwalter/cockpit,maxamillion/cockpit,vanloswang/cockpit,moolitayer/cockpit,Thermionix/cockpit,martinpitt/cockpit,sgallagher/cockpit,harishanand95/cockpit,deryni/cockpit,Armstrong1992/cockpit,darioajr/cockpit,matobet/cockpit,matobet/cockpit,petervo/cockpit,haiyangd/cockpit_view,firebitsbr/cockpit,nmav/cockpit,garrett/cockpit,cockpituous/cockpit,mareklibra/cockpit,stefwalter/cockpit,larskarlitski/cockpit,andreasn/cockpit,Scribery/cockpit,cockpituous/cockpit,evol262/cockpit,arilivigni/cockpit,SotolitoLabs/cockpit,fridex/cockpit,xhad/cockpit,Armstrong1992/cockpit,vanloswang/cockpit,haiyangd/cockpit_view,deryni/cockpit,cockpit-project/cockpit,martinpitt/cockpit,zigitax/cockpit,xhad/cockpit,sgallagher/cockpit,evol262/cockpit,martinpitt/cockpit,netzvieh/cockpit,michalskrivanek/cockpit,andreasn/cockpit,netzvieh/cockpit,firebitsbr/cockpit,cockpituous/cockpit,FireDrunk/cockpit,mareklibra/cockpit,maxamillion/cockpit,firebitsbr/cockpit,mvollmer/cockpit,moolitayer/cockpit,zigitax/cockpit,xhad/cockpit,larskarlitski/cockpit,deryni/cockpit,maxamillion/cockpit,garrett/cockpit,darioajr/cockpit,matobet/cockpit,stefwalter/cockpit,moraleslazaro/cockpit,mvollmer/cockpit,Armstrong1992/cockpit,vanloswang/cockpit,darioajr/cockpit,deryni/cockpit,dperpeet/cockpit,xhad/cockpit,Scribery/cockpit,cockpit-project/cockpit,vbatts/cockpit,SotolitoLabs/cockpit,sgallagher/cockpit,maxamillion/cockpit,denysvitali/cockpit,Scribery/cockpit,vanloswang/cockpit,cockpituous/cockpit,jscotka/cockpit,firebitsbr/cockpit,xhad/cockpit