Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I41cd58617d6df6de7942a541fb6dc9519c70bef0
Merged-In: I41cd58617d6df6de7942a541fb6dc9519c70bef0
diff --git a/keystore/IKeystoreService.cpp b/keystore/IKeystoreService.cpp
index eee9942..09a923d 100644
--- a/keystore/IKeystoreService.cpp
+++ b/keystore/IKeystoreService.cpp
@@ -106,7 +106,7 @@
*length = 0;
}
} else {
- *data = NULL;
+ *data = nullptr;
*length = 0;
}
}
@@ -1056,7 +1056,7 @@
sp<KeystoreArg> arg = new KeystoreArg(data.readInplace(inSize), inSize);
args.push_back(arg);
} else {
- args.push_back(NULL);
+ args.push_back(nullptr);
}
}
}
@@ -1290,7 +1290,7 @@
}
case ADD_AUTH_TOKEN: {
CHECK_INTERFACE(IKeystoreService, data, reply);
- const uint8_t* token_bytes = NULL;
+ const uint8_t* token_bytes = nullptr;
size_t size = 0;
readByteArray(data, &token_bytes, &size);
int32_t result = addAuthToken(token_bytes, size);