[balsa/wip/gtk4: 337/351] Do not use tloc argument of time()



commit 9d299160c4d7d9765151bd57b529f68c46216309
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Sun May 6 12:28:37 2018 -0400

    Do not use tloc argument of time()
    
    It's "obsolescent".

 libbalsa/mailbox_local.c |    2 +-
 libbalsa/mailbox_mbox.c  |    2 +-
 src/main-window.c        |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libbalsa/mailbox_local.c b/libbalsa/mailbox_local.c
index eae2c89..ef7e218 100644
--- a/libbalsa/mailbox_local.c
+++ b/libbalsa/mailbox_local.c
@@ -2383,7 +2383,7 @@ lbm_local_sync_real(LibBalsaMailboxLocal *local)
     LibBalsaMailbox *mailbox = (LibBalsaMailbox *)local;
     time_t tstart;
 
-    time(&tstart);
+    start = time(NULL);
     libbalsa_lock_mailbox(mailbox);
     if (priv->sync_id &&                       /* request still pending */
         MAILBOX_OPEN(mailbox) &&                   /* mailbox still open */
diff --git a/libbalsa/mailbox_mbox.c b/libbalsa/mailbox_mbox.c
index b0a45e2..89c050d 100644
--- a/libbalsa/mailbox_mbox.c
+++ b/libbalsa/mailbox_mbox.c
@@ -778,7 +778,7 @@ libbalsa_mailbox_mbox_open(LibBalsaMailbox *mailbox,
     mbox->msgno_2_msg_info = g_ptr_array_new();
 
     libbalsa_mailbox_clear_unread_messages(mailbox);
-    time(&t0);
+    t0 = time(NULL);
 
     if (st.st_size > 0) {
         lbm_mbox_restore(mbox);
diff --git a/src/main-window.c b/src/main-window.c
index 937b7c5..fe3ce81 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -3139,7 +3139,7 @@ bw_close_mailbox_on_timer(BalsaWindow * window)
     if (!balsa_app.close_mailbox_auto)
         return TRUE;
 
-    time(&current_time);
+    current_time = time(NULL);
 
     c = gtk_notebook_get_current_page(GTK_NOTEBOOK(balsa_app.notebook));
 
@@ -3556,7 +3556,7 @@ bw_check_messages_thread(struct check_messages_thread_info *info)
         g_idle_add((GSourceFunc) bw_check_messages_thread_idle_cb,
                    g_object_ref(info->window));
         if (priv->network_available)
-            time(&priv->last_check_time);
+            priv->last_check_time = time(NULL);
         g_object_unref(info->window);
     }
 


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