From d054f0a4d451120c26494263fc4dc175bfd405b1 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 12 Jan 2016 15:34:20 +0100 Subject: tree-wide: use xsprintf() where applicable Also add a coccinelle receipt to help with such transitions. --- src/bootchart/svg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/bootchart') diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c index 2bf473ffc1..79e261abe5 100644 --- a/src/bootchart/svg.c +++ b/src/bootchart/svg.c @@ -37,6 +37,7 @@ #include "fileio.h" #include "list.h" #include "macro.h" +#include "stdio-util.h" #include "store.h" #include "svg.h" #include "utf8.h" @@ -171,7 +172,7 @@ static int svg_title(FILE *of, const char *build, int pscount, double log_start, strncpy(rootbdev, &c[10], sizeof(rootbdev) - 1); rootbdev[3] = '\0'; - snprintf(filename, sizeof(filename), "/sys/block/%s/device/model", rootbdev); + xsprintf(filename, "/sys/block/%s/device/model", rootbdev); r = read_one_line_file(filename, &model); if (r < 0) -- cgit v1.2.3-54-g00ecf