]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/commitdiff
TransportRpmsg: Fix Check for Invalid Socket
authorAngela Stegmaier <angelabaker@ti.com>
Thu, 29 Sep 2016 21:14:55 +0000 (16:14 -0500)
committerAngela Stegmaier <angelabaker@ti.com>
Fri, 1 Sep 2017 20:20:11 +0000 (15:20 -0500)
A check for sock in TransportRpmsg was incorrectly checking
for sock != 0, when it should have been checking against
INVALIDSOCKET (the value uninitialized socket are set to).

This patch fixes the check.

Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
linux/src/transport/TransportRpmsg.c

index 7eb33563e19314f8006d5e9164b218c52ffe2d0a..c236e200296ab67ad0a6e417b6879cc7201c26a1 100644 (file)
@@ -466,7 +466,7 @@ Bool TransportRpmsg_put(Void *handle, Ptr pmsg)
      */
     clusterId = msg->dstProc - MultiProc_getBaseIdOfCluster();
     sock = TransportRpmsg_module->sock[clusterId];
-    if (!sock) {
+    if (sock == INVALIDSOCKET) {
         return FALSE;
     }