Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nvme-print.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const char *nvme_pel_event_to_string(int type)
{
static char str[STR_LEN];

sprintf(str, "%s(%#x)", pel_event_to_string(type), type);
snprintf(str, sizeof(str), "%s(%#x)", pel_event_to_string(type), type);

return str;
}
Expand Down Expand Up @@ -904,9 +904,9 @@ const char *nvme_degrees_string(long t)
long val = kelvin_to_celsius(t);

if (nvme_is_output_format_json())
sprintf(str, "%ld %s", val, "Celsius");
snprintf(str, sizeof(str), "%ld %s", val, "Celsius");
else
sprintf(str, "%ld °%s", val, "C");
snprintf(str, sizeof(str), "%ld °%s", val, "C");

return str;
}
Expand Down
Loading