diff options
author | Mahesh A Saptasagar <msapta@codeaurora.org> | 2014-09-18 18:35:29 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2014-11-04 08:45:01 -0700 |
commit | dd39bf9d9988e91c0c7e7d90b7e03539b0689277 (patch) | |
tree | 59a3d5b2b29f956c27effc58bc9aaaae0e0c5cf3 | |
parent | 63f682cbad1ec5af57630a045312f43d0d5c5e1c (diff) | |
download | android_system_netd-dd39bf9d9988e91c0c7e7d90b7e03539b0689277.tar.gz android_system_netd-dd39bf9d9988e91c0c7e7d90b7e03539b0689277.tar.bz2 android_system_netd-dd39bf9d9988e91c0c7e7d90b7e03539b0689277.zip |
netd: Fix 64bit incompatibility issue for NDC commands
Due to 64-bit incompatibility NDC commands output was not printed
on consolse. This commit handles 64-bit incompatibility issues and
ensures NDC command output are printed on console in proper format.
Change-Id: I4fe4dcdf9f991d361e6273bf715671c4cd160e76
CRs-Fixed: 726587
-rw-r--r-- | server/QsoftapCmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/QsoftapCmd.cpp b/server/QsoftapCmd.cpp index 8f578560..dab28207 100644 --- a/server/QsoftapCmd.cpp +++ b/server/QsoftapCmd.cpp @@ -48,7 +48,8 @@ int CommandListener::QsoftapCmd::runCommand(SocketClient *cli, if (!strcmp(argv[1], "qccmd")) { #define MAX_CMD_SIZE 256 char qcCmdBuf[MAX_CMD_SIZE], *pCmdBuf; - int len = MAX_CMD_SIZE, i = 2, ret; + u32 len = MAX_CMD_SIZE; + int i = 2, ret; if ( argc < 4 ) { cli->sendMsg(ResponseCode::OperationFailed, "failure: invalid arguments", true); @@ -119,7 +120,7 @@ int CommandListener::QsoftapCmd::runCommand(SocketClient *cli, while (argc--) { ret = snprintf(pCmdBuf, len, " %s", argv[i]); - if ((ret < 0) || (ret >= len)) { + if ((ret < 0) || (ret >= (int)len)) { /* Error case */ /* TODO: Command too long send the error message */ *pCmdBuf = '\0'; |