gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-11


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-115-gf4edb2d
Date: Mon, 24 Jan 2011 11:20:59 +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  f4edb2d165f01475149a41b7985927a128c6d0e4 (commit)
       via  113863663a15d8644c49034c3c58bed4cdb291e1 (commit)
      from  6a476e834953e4645ef7dd318eac254c4dfb0226 (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=f4edb2d165f01475149a41b7985927a128c6d0e4


commit f4edb2d165f01475149a41b7985927a128c6d0e4
Author: Daniele Forsi <address@hidden>
Date:   Mon Jan 24 12:18:44 2011 +0100

    Fix memleak in Parse_ReplyGetBattery
    
    Spare some cycles by removing strdup() since we're not going to
    alter the string.

diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index c5d0b90..be8577d 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -2169,11 +2169,11 @@ static gn_error ReplyMemoryRange(int messagetype, 
unsigned char *buffer, int len
 static gn_error Parse_ReplyGetBattery(gn_data *data, struct gn_statemachine 
*state)
 {
        at_driver_instance *drvinst = AT_DRVINST(state);
-       char *line, *pos;
+       const char *line, *pos;
        char key[4];
 
        snprintf(key, 4, "CBC");
-       line = strdup(map_get(&drvinst->cached_capabilities, key, 1));
+       line = map_get(&drvinst->cached_capabilities, key, 1);
        if (data->battery_level) {
                if (data->battery_unit)
                        *(data->battery_unit) = GN_BU_Percentage;

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=113863663a15d8644c49034c3c58bed4cdb291e1


commit f4edb2d165f01475149a41b7985927a128c6d0e4
Author: Daniele Forsi <address@hidden>
Date:   Mon Jan 24 12:18:44 2011 +0100

    Fix memleak in Parse_ReplyGetBattery
    
    Spare some cycles by removing strdup() since we're not going to
    alter the string.

diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index c5d0b90..be8577d 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -2169,11 +2169,11 @@ static gn_error ReplyMemoryRange(int messagetype, 
unsigned char *buffer, int len
 static gn_error Parse_ReplyGetBattery(gn_data *data, struct gn_statemachine 
*state)
 {
        at_driver_instance *drvinst = AT_DRVINST(state);
-       char *line, *pos;
+       const char *line, *pos;
        char key[4];
 
        snprintf(key, 4, "CBC");
-       line = strdup(map_get(&drvinst->cached_capabilities, key, 1));
+       line = map_get(&drvinst->cached_capabilities, key, 1);
        if (data->battery_level) {
                if (data->battery_unit)
                        *(data->battery_unit) = GN_BU_Percentage;

-----------------------------------------------------------------------

Summary of changes:
 common/phones/atgen.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]