Skip to content

Commit 05afb01

Browse files
committed
Fix integer size issue on 32-bit platforms
Signed-off-by: Stephen Gallagher <[email protected]>
1 parent c64837f commit 05afb01

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

modulemd/modulemd-module.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,8 @@ modulemd_module_add_obsoletes (ModulemdModule *self,
877877
continue;
878878
}
879879
g_info (
880-
"Overriding existing obsolete because of idenical stream: %s, "
881-
"context: %s and modified time: %lu.",
880+
"Overriding existing obsolete because of identical stream: %s, "
881+
"context: %s and modified time: %" PRIu64 ".",
882882
modulemd_obsoletes_get_module_stream (obsoletes),
883883
modulemd_obsoletes_get_module_context (obsoletes),
884884
modulemd_obsoletes_get_modified (obsoletes));
@@ -967,7 +967,7 @@ modulemd_module_add_obsoletes (ModulemdModule *self,
967967
g_info (
968968
"Multiple obsoletes for module: %s, stream: %s, context: "
969969
"%s "
970-
"with identical modified time: %lu",
970+
"with identical modified time: %" PRIu64,
971971
modulemd_module_get_module_name (self),
972972
stream_str,
973973
context_str,

modulemd/modulemd-obsoletes.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self,
10921092
error,
10931093
MODULEMD_ERROR,
10941094
MMD_ERROR_VALIDATE,
1095-
"Cannot convert modified date: %lu to iso8601 date.",
1095+
"Cannot convert modified date: %" PRIu64 " to iso8601 date.",
10961096
modulemd_obsoletes_get_modified (MODULEMD_OBSOLETES (self)));
10971097
return FALSE;
10981098
}
@@ -1166,7 +1166,8 @@ modulemd_obsoletes_emit_yaml (ModulemdObsoletes *self,
11661166
g_set_error (error,
11671167
MODULEMD_ERROR,
11681168
MMD_ERROR_VALIDATE,
1169-
"Cannot convert eol_date: %lu to iso8601 date.",
1169+
"Cannot convert eol_date: %" PRIu64
1170+
" to iso8601 date.",
11701171
eol_date);
11711172
return FALSE;
11721173
}
@@ -1231,7 +1232,7 @@ modulemd_obsoletes_is_active (ModulemdObsoletes *self)
12311232

12321233
char buf[255];
12331234
strftime (buf, sizeof (buf), "%Y%m%d%H%M", tm);
1234-
guint64 now = atol (buf);
1235+
guint64 now = g_ascii_strtoull (buf, NULL, 0);
12351236

12361237
if (now >= modulemd_obsoletes_get_eol_date (self))
12371238
{

modulemd/modulemd-util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ modulemd_iso8601date_to_guint64 (const gchar *iso8601)
521521
char buf[32];
522522
strftime (buf, sizeof (buf), "%Y%m%d%H%M", &tm);
523523

524-
return atol (buf);
524+
return g_ascii_strtoull (buf, NULL, 0);
525525
}
526526

527527

0 commit comments

Comments
 (0)