patch-rocdigs_impl_ddx_nmra_c 801 B

123456789101112131415161718192021222324
  1. $OpenBSD: patch-rocdigs_impl_ddx_nmra_c,v 1.1 2017/05/07 23:57:16 espie Exp $
  2. Index: rocdigs/impl/ddx/nmra.c
  3. --- rocdigs/impl/ddx/nmra.c.orig
  4. +++ rocdigs/impl/ddx/nmra.c
  5. @@ -1112,7 +1112,7 @@ int protocol_nmra_sm_direct_cvbyte(obj inst, int cv, i
  6. int ack = 0;
  7. /* no special error handling, it's job of the clients */
  8. - if (cv<0 || cv>1024 || value<0 || value>255) return;
  9. + if (cv<0 || cv>1024 || value<0 || value>255) return 0;
  10. if (!sm_initialized) sm_init();
  11. @@ -1333,7 +1333,7 @@ int nmragetcvbyte(obj inst, int cv) {
  12. TraceOp.trc( __FILE__, TRCLEVEL_MONITOR, __LINE__, 9999, "PT: cvget for %d", cv);
  13. /* no special error handling, it's job of the clients */
  14. - if (cv<0 || cv>1024) return;
  15. + if (cv<0 || cv>1024) return 0;
  16. if (!sm_initialized) sm_init();