summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-08-06 15:39:08 -0700
committerGlenn Kasten <gkasten@google.com>2013-08-12 16:26:12 -0700
commit9156ef3e11b68cc4b6d3cea77f1f63673855a6d1 (patch)
tree700dbc7c88d9ea46944cf9c35de4997195a4e724 /services
parente51a70ab6326715f614c737de1e8ea1941057b3b (diff)
downloadframeworks_av-9156ef3e11b68cc4b6d3cea77f1f63673855a6d1.zip
frameworks_av-9156ef3e11b68cc4b6d3cea77f1f63673855a6d1.tar.gz
frameworks_av-9156ef3e11b68cc4b6d3cea77f1f63673855a6d1.tar.bz2
Status pointer passed by caller is always non-NULL
in createTrack, openRecord, createEffect, createTrack_l, createRecordTrack_l, and createEffect_l. Change-Id: I2e459e4de9c78145f4d496e6abf289479a2f0941
Diffstat (limited to 'services')
-rw-r--r--services/audioflinger/AudioFlinger.cpp12
-rw-r--r--services/audioflinger/AudioFlinger.h6
-rw-r--r--services/audioflinger/Threads.cpp15
-rw-r--r--services/audioflinger/Threads.h6
4 files changed, 13 insertions, 26 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 46697e7..2c6d3d9 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -537,9 +537,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(
}
Exit:
- if (status != NULL) {
- *status = lStatus;
- }
+ *status = lStatus;
return trackHandle;
}
@@ -1276,9 +1274,7 @@ sp<IAudioRecord> AudioFlinger::openRecord(
lStatus = NO_ERROR;
Exit:
- if (status) {
- *status = lStatus;
- }
+ *status = lStatus;
return recordHandle;
}
@@ -2211,9 +2207,7 @@ sp<IEffect> AudioFlinger::createEffect(
}
Exit:
- if (status != NULL) {
- *status = lStatus;
- }
+ *status = lStatus;
return handle;
}
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index e5e4113..50c20b8 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -109,7 +109,7 @@ public:
pid_t tid,
int *sessionId,
String8& name,
- status_t *status);
+ status_t *status /*non-NULL*/);
virtual sp<IAudioRecord> openRecord(
audio_io_handle_t input,
@@ -120,7 +120,7 @@ public:
IAudioFlinger::track_flags_t *flags,
pid_t tid,
int *sessionId,
- status_t *status);
+ status_t *status /*non-NULL*/);
virtual uint32_t sampleRate(audio_io_handle_t output) const;
virtual int channelCount(audio_io_handle_t output) const;
@@ -209,7 +209,7 @@ public:
int32_t priority,
audio_io_handle_t io,
int sessionId,
- status_t *status,
+ status_t *status /*non-NULL*/,
int *id,
int *enabled);
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 458b7be..507ff9f 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -695,8 +695,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l(
int sessionId,
effect_descriptor_t *desc,
int *enabled,
- status_t *status
- )
+ status_t *status)
{
sp<EffectModule> effect;
sp<EffectHandle> handle;
@@ -796,9 +795,7 @@ Exit:
handle.clear();
}
- if (status != NULL) {
- *status = lStatus;
- }
+ *status = lStatus;
return handle;
}
@@ -1277,9 +1274,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac
lStatus = NO_ERROR;
Exit:
- if (status) {
- *status = lStatus;
- }
+ *status = lStatus;
return track;
}
@@ -4524,9 +4519,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createR
lStatus = NO_ERROR;
Exit:
- if (status) {
- *status = lStatus;
- }
+ *status = lStatus;
return track;
}
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index c4fcc5b..fce3245 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -158,7 +158,7 @@ public:
int sessionId,
effect_descriptor_t *desc,
int *enabled,
- status_t *status);
+ status_t *status /*non-NULL*/);
void disconnectEffect(const sp< EffectModule>& effect,
EffectHandle *handle,
bool unpinIfLast);
@@ -421,7 +421,7 @@ public:
int sessionId,
IAudioFlinger::track_flags_t *flags,
pid_t tid,
- status_t *status);
+ status_t *status /*non-NULL*/);
AudioStreamOut* getOutput() const;
AudioStreamOut* clearOutput();
@@ -839,7 +839,7 @@ public:
int sessionId,
IAudioFlinger::track_flags_t *flags,
pid_t tid,
- status_t *status);
+ status_t *status /*non-NULL*/);
status_t start(RecordTrack* recordTrack,
AudioSystem::sync_event_t event,