gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis-gtk] branch master updated: -check return values, other


From: gnunet
Subject: [taler-anastasis-gtk] branch master updated: -check return values, other minor bugs
Date: Fri, 13 Dec 2024 15:32:36 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis-gtk.

The following commit(s) were added to refs/heads/master by this push:
     new 46a7a8c  -check return values, other minor bugs
46a7a8c is described below

commit 46a7a8cbeb36aeb8e9f9eb619105403063a3ccb7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Dec 13 15:32:33 2024 +0100

    -check return values, other minor bugs
---
 src/anastasis/anastasis-gtk_action.c                     | 15 ++++++++-------
 .../anastasis-gtk_handle-auth-edit-provider-clicked.c    | 10 +++++++---
 src/anastasis/anastasis-gtk_handle-method-totp.c         |  7 ++++---
 src/anastasis/anastasis-gtk_progress.c                   | 16 +++++++++++-----
 4 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/src/anastasis/anastasis-gtk_action.c 
b/src/anastasis/anastasis-gtk_action.c
index d4e2108..e94cc4b 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -1473,12 +1473,12 @@ action_secret_editing (void)
                                         true);
         if (0 != strcmp (old,
                          NULL != text
-                        ? text
-                        : ""))
+       ? text
+       : ""))
           gtk_text_buffer_set_text (tb,
                                     NULL != text
-                                   ? text
-                                   : "",
+            ? text
+            : "",
                                     -1);
       }
       update_label ("anastasis_gtk_secret_file_name_label",
@@ -2182,9 +2182,10 @@ long_poll_providers_action_cb (void *cls,
     ap = json_object_get (response,
                           "authentication_providers");
     ns = json_incref (AG_redux_state);
-    json_object_set (ns,
-                     "authentication_providers",
-                     ap);
+    GNUNET_assert (0 ==
+                   json_object_set (ns,
+                                    "authentication_providers",
+                                    ap));
     AG_action_cb (NULL,
                   TALER_EC_NONE,
                   ns);
diff --git a/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c 
b/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
index 96368cf..c263d78 100644
--- a/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
+++ b/src/anastasis/anastasis-gtk_handle-auth-edit-provider-clicked.c
@@ -170,9 +170,13 @@ provider_toggle_callback (GtkCellRendererToggle *cell,
     return;
   }
   path = gtk_tree_path_new_from_string (path_str);
-  gtk_tree_model_get_iter (tm,
-                           &iter,
-                           path);
+  if (! gtk_tree_model_get_iter (tm,
+                                 &iter,
+                                 path))
+  {
+    GNUNET_break (0);
+    return;
+  }
   gtk_tree_model_get (tm,
                       &iter,
                       AG_PMC_PROVIDER_ENABLED, &enabled,
diff --git a/src/anastasis/anastasis-gtk_handle-method-totp.c 
b/src/anastasis/anastasis-gtk_handle-method-totp.c
index 2de539d..98ec865 100644
--- a/src/anastasis/anastasis-gtk_handle-method-totp.c
+++ b/src/anastasis/anastasis-gtk_handle-method-totp.c
@@ -91,9 +91,10 @@ compute_totp (int time_off)
                    gcry_md_open (&md,
                                  GCRY_MD_SHA1,
                                  GCRY_MD_FLAG_HMAC));
-    gcry_md_setkey (md,
-                    totp_key,
-                    sizeof (totp_key));
+    GNUNET_assert (GPG_ERR_NO_ERROR ==
+                   gcry_md_setkey (md,
+                                   totp_key,
+                                   sizeof (totp_key)));
     gcry_md_write (md,
                    &ctr,
                    sizeof (ctr));
diff --git a/src/anastasis/anastasis-gtk_progress.c 
b/src/anastasis/anastasis-gtk_progress.c
index d3863bd..bc80758 100644
--- a/src/anastasis/anastasis-gtk_progress.c
+++ b/src/anastasis/anastasis-gtk_progress.c
@@ -34,7 +34,8 @@
 gboolean
 anastasis_gtk_backup_progress_treeview_button_press_event_cb (GtkWidget 
*widget,
                                                               GdkEvent  *event,
-                                                              gpointer 
user_data)
+                                                              gpointer 
user_data
+                                                              )
 {
   return TRUE;
 }
@@ -113,16 +114,21 @@ AG_progress_update (void)
       return;
     }
     ts = GTK_TREE_SELECTION (GCG_get_main_window_object (
-                               
"anastasis_gtk_recovery_progress_tree_selection"));
+                               
"anastasis_gtk_recovery_progress_tree_selection")
+                             );
   }
   else
   {
     ts = GTK_TREE_SELECTION (GCG_get_main_window_object (
                                
"anastasis_gtk_backup_progress_tree_selection"));
   }
-  gtk_tree_selection_get_selected (ts,
-                                   &tm,
-                                   &iter);
+  if (! gtk_tree_selection_get_selected (ts,
+                                         &tm,
+                                         &iter))
+  {
+    GNUNET_break (0);
+    return;
+  }
   if (! gtk_tree_model_get_iter_first (tm,
                                        &iter))
   {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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