From 42b3957c0386ec9e466dc98b1318bf389cc2a4dc Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 22 Jul 2013 20:34:02 +0800 Subject: [PATCH] Usermode/AxWin3 - Fixed scan-build complaints in libaxwin3.so --- .../Applications/axwin3_src/libaxwin3.so_src/msg.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c b/Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c index 955da447..a9e41647 100644 --- a/Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c +++ b/Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c @@ -59,13 +59,15 @@ void AxWin3_Connect(const char *ServerDesc) } break; case 'u': - while(*ServerDesc && *ServerDesc != ':') ServerDesc ++; - ServerDesc ++; + assert( strncmp(ServerDesc, "udp:", 4) == 0 ); + ServerDesc += 4; + _SysDebug("TODO: UDP connection to '%s'", ServerDesc); // TODO: Open socket and create UDP header break; case 't': - while(*ServerDesc && *ServerDesc != ':') ServerDesc ++; - ServerDesc ++; + assert( strncmp(ServerDesc, "tcp:", 4) == 0 ); + ServerDesc += 4; + _SysDebug("TODO: TCP connection to '%s'", ServerDesc); // TODO: Open socket break; case 'p': -- 2.20.1