Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3694ec1f authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Use NULL not 0 for raw pointers

Use if (p != NULL) instead of if (ptr)

Change-Id: Iaec3413a59ccbf233c98fcd918cc7d70ac5da9fa
parent 7bd4f6f4
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -226,8 +226,8 @@ public:
    AudioEffect(const effect_uuid_t *type,
                const effect_uuid_t *uuid = NULL,
                  int32_t priority = 0,
                  effect_callback_t cbf = 0,
                  void* user = 0,
                  effect_callback_t cbf = NULL,
                  void* user = NULL,
                  int sessionId = 0,
                  audio_io_handle_t io = 0
                  );
@@ -238,8 +238,8 @@ public:
    AudioEffect(const char *typeStr,
                    const char *uuidStr = NULL,
                    int32_t priority = 0,
                    effect_callback_t cbf = 0,
                    void* user = 0,
                    effect_callback_t cbf = NULL,
                    void* user = NULL,
                    int sessionId = 0,
                    audio_io_handle_t io = 0
                    );
@@ -260,8 +260,8 @@ public:
            status_t    set(const effect_uuid_t *type,
                            const effect_uuid_t *uuid = NULL,
                            int32_t priority = 0,
                            effect_callback_t cbf = 0,
                            void* user = 0,
                            effect_callback_t cbf = NULL,
                            void* user = NULL,
                            int sessionId = 0,
                            audio_io_handle_t io = 0
                            );
+4 −4
Original line number Diff line number Diff line
@@ -155,8 +155,8 @@ public:
                                    uint32_t channelMask = AUDIO_CHANNEL_IN_MONO,
                                    int frameCount      = 0,
                                    uint32_t flags      = 0,
                                    callback_t cbf = 0,
                                    void* user = 0,
                                    callback_t cbf = NULL,
                                    void* user = NULL,
                                    int notificationFrames = 0,
                                    int sessionId = 0);

@@ -181,8 +181,8 @@ public:
                            uint32_t channelMask = AUDIO_CHANNEL_IN_MONO,
                            int frameCount      = 0,
                            uint32_t flags      = 0,
                            callback_t cbf = 0,
                            void* user = 0,
                            callback_t cbf = NULL,
                            void* user = NULL,
                            int notificationFrames = 0,
                            bool threadCanCallJava = false,
                            int sessionId = 0);
+6 −6
Original line number Diff line number Diff line
@@ -148,8 +148,8 @@ public:
                                    int channelMask      = 0,
                                    int frameCount       = 0,
                                    uint32_t flags       = 0,
                                    callback_t cbf       = 0,
                                    void* user           = 0,
                                    callback_t cbf       = NULL,
                                    void* user           = NULL,
                                    int notificationFrames = 0,
                                    int sessionId = 0);

@@ -180,8 +180,8 @@ public:
                                    int channelMask     = 0,
                                    const sp<IMemory>& sharedBuffer = 0,
                                    uint32_t flags      = 0,
                                    callback_t cbf      = 0,
                                    void* user          = 0,
                                    callback_t cbf      = NULL,
                                    void* user          = NULL,
                                    int notificationFrames = 0,
                                    int sessionId = 0);

@@ -204,8 +204,8 @@ public:
                            int channelMask     = 0,
                            int frameCount      = 0,
                            uint32_t flags      = 0,
                            callback_t cbf      = 0,
                            void* user          = 0,
                            callback_t cbf      = NULL,
                            void* user          = NULL,
                            int notificationFrames = 0,
                            const sp<IMemory>& sharedBuffer = 0,
                            bool threadCanCallJava = false,
+2 −2
Original line number Diff line number Diff line
@@ -66,8 +66,8 @@ public:
     * See AudioEffect constructor for details on parameters.
     */
                        Visualizer(int32_t priority = 0,
                                   effect_callback_t cbf = 0,
                                   void* user = 0,
                                   effect_callback_t cbf = NULL,
                                   void* user = NULL,
                                   int sessionId = 0);

                        ~Visualizer();
+4 −4
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ void AudioEffect::binderDied()
{
    ALOGW("IEffect died");
    mStatus = NO_INIT;
    if (mCbf) {
    if (mCbf != NULL) {
        status_t status = DEAD_OBJECT;
        mCbf(EVENT_ERROR, mUserData, &status);
    }
@@ -363,7 +363,7 @@ void AudioEffect::controlStatusChanged(bool controlGranted)
            mStatus = ALREADY_EXISTS;
        }
    }
    if (mCbf) {
    if (mCbf != NULL) {
        mCbf(EVENT_CONTROL_STATUS_CHANGED, mUserData, &controlGranted);
    }
}
@@ -373,7 +373,7 @@ void AudioEffect::enableStatusChanged(bool enabled)
    ALOGV("enableStatusChanged %p enabled %d mCbf %p", this, enabled, mCbf);
    if (mStatus == ALREADY_EXISTS) {
        mEnabled = enabled;
        if (mCbf) {
        if (mCbf != NULL) {
            mCbf(EVENT_ENABLE_STATUS_CHANGED, mUserData, &enabled);
        }
    }
@@ -389,7 +389,7 @@ void AudioEffect::commandExecuted(uint32_t cmdCode,
        return;
    }

    if (mCbf && cmdCode == EFFECT_CMD_SET_PARAM) {
    if (mCbf != NULL && cmdCode == EFFECT_CMD_SET_PARAM) {
        effect_param_t *cmd = (effect_param_t *)cmdData;
        cmd->status = *(int32_t *)replyData;
        mCbf(EVENT_PARAMETER_CHANGED, mUserData, cmd);
Loading