mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 06:00:32 +01:00
cli: fix incorrect cast to time_t pointer
This commit is contained in:
parent
57e7ccca6d
commit
6780818974
1 changed files with 3 additions and 1 deletions
|
|
@ -400,6 +400,7 @@ show_connection (NMConnection *data, gpointer user_data)
|
|||
NmCli *nmc = (NmCli *) user_data;
|
||||
NMSettingConnection *s_con;
|
||||
guint64 timestamp;
|
||||
time_t timestamp_real;
|
||||
char *timestamp_str;
|
||||
char timestamp_real_str[64];
|
||||
|
||||
|
|
@ -408,7 +409,8 @@ show_connection (NMConnection *data, gpointer user_data)
|
|||
/* Obtain field values */
|
||||
timestamp = nm_setting_connection_get_timestamp (s_con);
|
||||
timestamp_str = g_strdup_printf ("%" G_GUINT64_FORMAT, timestamp);
|
||||
strftime (timestamp_real_str, sizeof (timestamp_real_str), "%c", localtime ((time_t *) ×tamp));
|
||||
timestamp_real = timestamp;
|
||||
strftime (timestamp_real_str, sizeof (timestamp_real_str), "%c", localtime (×tamp_real));
|
||||
|
||||
nmc->allowed_fields[0].value = nm_setting_connection_get_id (s_con);
|
||||
nmc->allowed_fields[1].value = nm_setting_connection_get_uuid (s_con);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue