From 05a41d8f23e9db9c1954eedd0efdfb0a5aec0ad8 Mon Sep 17 00:00:00 2001 From: Brett Gordon Date: Tue, 7 Nov 2017 23:41:40 -0500 Subject: [PATCH] netd: correct lwwire poll returning -1 for no reason. --- Applications/netd/lwwire.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Applications/netd/lwwire.c b/Applications/netd/lwwire.c index 97e011fc..1cc469c7 100644 --- a/Applications/netd/lwwire.c +++ b/Applications/netd/lwwire.c @@ -32,7 +32,9 @@ static int dwnet_poll( void ) if( ret < 0 ){ return -1; } - return (buf[0]<<8) + buf[1]; + ret = (buf[0]<<8) + buf[1]; + if (ret<0) return 0; + return ret; } -- 2.34.1