[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-32
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-327-g7da17ff |
Date: |
Sun, 04 Dec 2011 14:33:13 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".
The branch, master has been updated
via 7da17ffcb63989ebacd50fcb847f1068686d2cad (commit)
from c52a43c931ff63c2664b91aa4c7e7c42c12960ba (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=7da17ffcb63989ebacd50fcb847f1068686d2cad
commit 7da17ffcb63989ebacd50fcb847f1068686d2cad
Author: Daniele Forsi <address@hidden>
Date: Sun Dec 4 15:29:48 2011 +0100
No need to check for NULL before calling free()
Fixes some style checks performed by cppcheck 1.4:
[./common/gsm-mms.c:800]: (style) Redundant condition. It is safe to
deallocate a NULL pointer
[./common/gsm-mms.c:802]: (style) Redundant condition. It is safe to
deallocate a NULL pointer
[./common/gsm-mms.c:804]: (style) Redundant condition. It is safe to
deallocate a NULL pointer
[./common/gsm-mms.c:806]: (style) Redundant condition. It is safe to
deallocate a NULL pointer
[./utils/mgnokiidev.c:216]: (style) Redundant condition. It is safe to
deallocate a NULL pointer
diff --git a/common/gsm-mms.c b/common/gsm-mms.c
index f08d139..1c0f6c5 100644
--- a/common/gsm-mms.c
+++ b/common/gsm-mms.c
@@ -790,21 +790,17 @@ GNOKII_API gn_error gn_mms_delete(gn_data *data, struct
gn_statemachine *state)
/**
* gn_mms_free - free an @mms
- * @mms: a pointer to a @gn_mms returned by gn_mms_alloc()
+ * @mms: a pointer to a @gn_mms returned by gn_mms_alloc() or #NULL
*
* Return value: a @gn_error code
*/
GNOKII_API gn_error gn_mms_free(gn_mms *mms)
{
if (mms) {
- if (mms->tid)
- free(mms->tid);
- if (mms->from)
- free(mms->from);
- if (mms->to)
- free(mms->to);
- if (mms->buffer)
- free(mms->buffer);
+ free(mms->tid);
+ free(mms->from);
+ free(mms->to);
+ free(mms->buffer);
free(mms);
}
diff --git a/utils/mgnokiidev.c b/utils/mgnokiidev.c
index faf0c9f..d4d7b4f 100644
--- a/utils/mgnokiidev.c
+++ b/utils/mgnokiidev.c
@@ -213,6 +213,6 @@ int main(int argc, char **argv)
/* Done */
exit(0);
error:
- if (name) free(name);
+ free(name);
exit(-2);
}
-----------------------------------------------------------------------
Summary of changes:
common/gsm-mms.c | 14 +++++---------
utils/mgnokiidev.c | 2 +-
2 files changed, 6 insertions(+), 10 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-327-g7da17ff,
Daniele Forsi <=