[PATCH 6/6] mbimcli: make 'session_id' variables consistently guint32

Ben Chan benchan at chromium.org
Thu Jul 27 01:44:53 UTC 2017


This patch updates the code to consistently use guint32, instead of
guint, for 'session_id' variables as SessionId is UINT32.
---
 src/mbimcli/mbimcli-basic-connect.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/mbimcli/mbimcli-basic-connect.c b/src/mbimcli/mbimcli-basic-connect.c
index 3ce0ce2..8c0e512 100644
--- a/src/mbimcli/mbimcli-basic-connect.c
+++ b/src/mbimcli/mbimcli-basic-connect.c
@@ -742,7 +742,7 @@ ip_configuration_query_ready (MbimDevice *device,
 static void
 ip_configuration_query (MbimDevice *device,
                         GCancellable *cancellable,
-                        guint session_id)
+                        guint32 session_id)
 {
     MbimMessage *message;
     GError *error = NULL;
@@ -878,7 +878,7 @@ mbim_auth_protocol_from_string (const gchar      *str,
 static gboolean
 connect_session_id_parse (const gchar  *str,
                           gboolean      allow_empty,
-                          guint        *session_id,
+                          guint32      *session_id,
                           GError      **error)
 {
     gchar *endptr = NULL;
@@ -909,13 +909,13 @@ connect_session_id_parse (const gchar  *str,
                      str);
         return FALSE;
     }
-    *session_id = (guint) n;
+    *session_id = (guint32) n;
 
     return TRUE;
 }
 
 typedef struct {
-    guint             session_id;
+    guint32           session_id;
     gchar            *apn;
     MbimAuthProtocol  auth_protocol;
     gchar            *username;
@@ -971,7 +971,7 @@ static gboolean connect_activate_properties_handle (const gchar  *key,
 
 static gboolean
 set_connect_activate_parse (const gchar       *str,
-                            guint             *session_id,
+                            guint32           *session_id,
                             gchar            **apn,
                             MbimAuthProtocol  *auth_protocol,
                             gchar            **username,
@@ -1902,7 +1902,7 @@ mbimcli_basic_connect_run (MbimDevice   *device,
     if (query_connect_str) {
         MbimMessage *request;
         GError *error = NULL;
-        guint session_id = 0;
+        guint32 session_id = 0;
 
         if (!connect_session_id_parse (query_connect_str, TRUE, &session_id, &error)) {
             g_printerr ("error: couldn't parse session ID: %s\n", error->message);
@@ -1939,7 +1939,7 @@ mbimcli_basic_connect_run (MbimDevice   *device,
     if (set_connect_activate_str) {
         MbimMessage *request;
         GError *error = NULL;
-        guint session_id = 0;
+        guint32 session_id = 0;
         gchar *apn;
         MbimAuthProtocol auth_protocol;
         gchar *username = NULL;
@@ -1989,7 +1989,7 @@ mbimcli_basic_connect_run (MbimDevice   *device,
     /* Query IP configuration? */
     if (query_ip_configuration_str) {
         GError *error = NULL;
-        guint session_id = 0;
+        guint32 session_id = 0;
 
         if (!connect_session_id_parse (query_ip_configuration_str, TRUE, &session_id, &error)) {
             g_printerr ("error: couldn't parse session ID: %s\n", error->message);
@@ -2006,7 +2006,7 @@ mbimcli_basic_connect_run (MbimDevice   *device,
     if (set_connect_deactivate_str) {
         MbimMessage *request;
         GError *error = NULL;
-        guint session_id = 0;
+        guint32 session_id = 0;
 
         if (!connect_session_id_parse (set_connect_deactivate_str, TRUE, &session_id, &error)) {
             g_printerr ("error: couldn't parse session ID: %s\n", error->message);
-- 
2.14.0.rc0.400.g1c36432dff-goog



More information about the libmbim-devel mailing list