Skip to content

Commit c0e00d5

Browse files
authored
use PRIu64 to format uint64_t (#1581)
1 parent a529c1e commit c0e00d5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/graph/entities/graph_entity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ void GraphEntity_ToString(const GraphEntity *e, char **buffer, size_t *bufferLen
169169

170170
// write id
171171
if(format & ENTITY_ID) {
172-
*bytesWritten += snprintf(*buffer + *bytesWritten, *bufferLen, "%llu", ENTITY_GET_ID(e));
172+
*bytesWritten += snprintf(*buffer + *bytesWritten, *bufferLen, "%" PRIu64, ENTITY_GET_ID(e));
173173
}
174174

175175
// write label

src/util/range/unsigned_range.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ void UnsignedRange_ToString(const UnsignedRange *range) {
120120
if(range->include_min) offset += sprintf(buff + offset, "[");
121121
else offset += sprintf(buff + offset, "(");
122122

123-
offset += sprintf(buff + offset, "%llu", range->min);
123+
offset += sprintf(buff + offset, "%" PRIu64, range->min);
124124

125125
offset += sprintf(buff + offset, ",");
126126

127127
if(range->max == UINT64_MAX) offset += sprintf(buff + offset, "UINT64_MAX");
128-
else offset += sprintf(buff + offset, "%llu", range->max);
128+
else offset += sprintf(buff + offset, "%" PRIu64, range->max);
129129

130130
if(range->include_max) offset += sprintf(buff + offset, "]");
131131
else offset += sprintf(buff + offset, ")");

0 commit comments

Comments
 (0)