diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-27 16:47:15 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-02-03 07:57:01 -0800 |
commit | a0d68338a88c2ddb4502f95017b546d603ef1ec7 (patch) | |
tree | f052125f4720fde00179d41d4ee04e02934052e4 /media/libmedia/AudioSystem.cpp | |
parent | 87f155d6655b2d3b27e69281a29e85c6407e4d26 (diff) | |
download | frameworks_av-a0d68338a88c2ddb4502f95017b546d603ef1ec7.zip frameworks_av-a0d68338a88c2ddb4502f95017b546d603ef1ec7.tar.gz frameworks_av-a0d68338a88c2ddb4502f95017b546d603ef1ec7.tar.bz2 |
Use NULL not 0 for raw pointers
Use if (p != NULL) instead of if (ptr)
Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
Diffstat (limited to 'media/libmedia/AudioSystem.cpp')
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index df5017b..110a294 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -225,7 +225,7 @@ status_t AudioSystem::getOutputSamplingRate(int* samplingRate, audio_stream_type gLock.lock(); outputDesc = AudioSystem::gOutputs.valueFor(output); - if (outputDesc == 0) { + if (outputDesc == NULL) { ALOGV("getOutputSamplingRate() no output descriptor for output %d in gOutputs", output); gLock.unlock(); const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); @@ -263,7 +263,7 @@ status_t AudioSystem::getOutputFrameCount(int* frameCount, audio_stream_type_t s gLock.lock(); outputDesc = AudioSystem::gOutputs.valueFor(output); - if (outputDesc == 0) { + if (outputDesc == NULL) { gLock.unlock(); const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); if (af == 0) return PERMISSION_DENIED; @@ -294,7 +294,7 @@ status_t AudioSystem::getOutputLatency(uint32_t* latency, audio_stream_type_t st gLock.lock(); outputDesc = AudioSystem::gOutputs.valueFor(output); - if (outputDesc == 0) { + if (outputDesc == NULL) { gLock.unlock(); const sp<IAudioFlinger>& af = AudioSystem::get_audio_flinger(); if (af == 0) return PERMISSION_DENIED; @@ -413,7 +413,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v switch (event) { case STREAM_CONFIG_CHANGED: - if (param2 == 0) break; + if (param2 == NULL) break; stream = *(audio_stream_type_t *)param2; ALOGV("ioConfigChanged() STREAM_CONFIG_CHANGED stream %d, output %d", stream, ioHandle); if (gStreamOutputMap.indexOfKey(stream) >= 0) { @@ -425,7 +425,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v ALOGV("ioConfigChanged() opening already existing output! %d", ioHandle); break; } - if (param2 == 0) break; + if (param2 == NULL) break; desc = (OutputDescriptor *)param2; OutputDescriptor *outputDesc = new OutputDescriptor(*desc); @@ -454,7 +454,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v ALOGW("ioConfigChanged() modifying unknow output! %d", ioHandle); break; } - if (param2 == 0) break; + if (param2 == NULL) break; desc = (OutputDescriptor *)param2; ALOGV("ioConfigChanged() new config for output %d samplingRate %d, format %d channels %d frameCount %d latency %d", |