[vz-dev] [volkszaehler/vzlogger] 790438: Fixed return value evaluation of ::read #578

beckenc noreply at github.com
Sa Feb 25 01:28:24 CET 2023


  Branch: refs/heads/master
  Home:   https://github.com/volkszaehler/vzlogger
  Commit: 790438d69453cc3dfd3cbcdc92fe5a9d18963a9e
      https://github.com/volkszaehler/vzlogger/commit/790438d69453cc3dfd3cbcdc92fe5a9d18963a9e
  Author: beckenc <github at claus-beckenbauer.de>
  Date:   2023-02-25 (Sat, 25 Feb 2023)

  Changed paths:
    M src/protocols/MeterS0.cpp

  Log Message:
  -----------
  Fixed return value evaluation of ::read #578

::read returns < 0 in case of an error and 0 in case of a timeout.
ret < 1 covers the timeout case as well as the error case, which is why the timeout path was never traversed.

Since the calling function does not evaluate the false as return value anyway, the bug has no effect on the function.




Mehr Informationen über die Mailingliste volkszaehler-dev