Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Remove assignment of function parameter, which has no effect outside the function #56

Closed
orbitcowboy opened this issue Dec 16, 2013 · 3 comments

Comments

@orbitcowboy
Copy link
Contributor

Please review the attached patch, it removes an assignment of a function parameter, which has no effect outside function.

Here is the patch:

diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp
index 65dd30a..eec4609 100644
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -480,6 +480,5 @@ long CreateDecoder (ISVCDecoder** ppDecoder) {
 void_t DestroyDecoder (ISVCDecoder* pDecoder) {
   if (NULL != pDecoder) {
     delete (CWelsDecoder*)pDecoder;
-    pDecoder = NULL;
   }
 }

Best regards and many thanks

Martin Ettl

@kali2
Copy link

kali2 commented Dec 16, 2013

I think it is a good habit to set NULL when delete a point.

@orbitcowboy
Copy link
Contributor Author

Since ISVCDecoder* pDecoder is provided by value, setting this pointer to NULL has no effect. Its simply a waste of time.

@ethanhugg
Copy link
Contributor

Rolled into pull request #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants