summaryrefslogtreecommitdiff
path: root/libsysutils/src/SocketClient.cpp
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2018-07-24 16:34:27 -0700
committerYi Kong <yikong@google.com>2018-07-24 16:34:27 -0700
commit4888525c558de0584c073b8701cebce312f768cc (patch)
tree253531db7d771c207a50347a9c055b1720bc5595 /libsysutils/src/SocketClient.cpp
parent56795ac483e09678b4c92b7cc213c1c68f8718f7 (diff)
[libsysutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning. Test: m Bug: 68236239 Change-Id: I9e95daa0750f2622d1c4788941fdfae23ee61801
Diffstat (limited to 'libsysutils/src/SocketClient.cpp')
-rw-r--r--libsysutils/src/SocketClient.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp
index 971f90821..0625db781 100644
--- a/libsysutils/src/SocketClient.cpp
+++ b/libsysutils/src/SocketClient.cpp
@@ -42,8 +42,8 @@ void SocketClient::init(int socket, bool owned, bool useCmdNum) {
mSocket = socket;
mSocketOwned = owned;
mUseCmdNum = useCmdNum;
- pthread_mutex_init(&mWriteMutex, NULL);
- pthread_mutex_init(&mRefCountMutex, NULL);
+ pthread_mutex_init(&mWriteMutex, nullptr);
+ pthread_mutex_init(&mRefCountMutex, nullptr);
mPid = -1;
mUid = -1;
mGid = -1;
@@ -135,9 +135,9 @@ char *SocketClient::quoteArg(const char *arg) {
const char *end = arg + len;
char *oldresult;
- if(result == NULL) {
+ if(result == nullptr) {
SLOGW("malloc error (%s)", strerror(errno));
- return NULL;
+ return nullptr;
}
*(current++) = '"';