Commit d8312772 authored by Max Kellermann's avatar Max Kellermann

output/oss: use nullptr instead of NULL

parent dc03ad05
...@@ -199,7 +199,7 @@ oss_open_default(Error &error) ...@@ -199,7 +199,7 @@ oss_open_default(Error &error)
OssOutput *od = new OssOutput(default_devices[i]); OssOutput *od = new OssOutput(default_devices[i]);
if (!od->Initialize(empty, error)) { if (!od->Initialize(empty, error)) {
delete od; delete od;
return NULL; return nullptr;
} }
return od; return od;
...@@ -232,18 +232,18 @@ oss_open_default(Error &error) ...@@ -232,18 +232,18 @@ oss_open_default(Error &error)
error.Set(oss_output_domain, error.Set(oss_output_domain,
"error trying to open default OSS device"); "error trying to open default OSS device");
return NULL; return nullptr;
} }
inline OssOutput * inline OssOutput *
OssOutput::Create(const config_param &param, Error &error) OssOutput::Create(const config_param &param, Error &error)
{ {
const char *device = param.GetBlockValue("device"); const char *device = param.GetBlockValue("device");
if (device != NULL) { if (device != nullptr) {
OssOutput *od = new OssOutput(); OssOutput *od = new OssOutput();
if (!od->Initialize(param, error)) { if (!od->Initialize(param, error)) {
delete od; delete od;
return NULL; return nullptr;
} }
od->device = device; od->device = device;
...@@ -280,8 +280,8 @@ oss_try_ioctl_r(int fd, unsigned long request, int *value_r, ...@@ -280,8 +280,8 @@ oss_try_ioctl_r(int fd, unsigned long request, int *value_r,
const char *msg, Error &error) const char *msg, Error &error)
{ {
assert(fd >= 0); assert(fd >= 0);
assert(value_r != NULL); assert(value_r != nullptr);
assert(msg != NULL); assert(msg != nullptr);
assert(!error.IsDefined()); assert(!error.IsDefined());
int ret = ioctl(fd, request, value_r); int ret = ioctl(fd, request, value_r);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment