From 5f1eafe8e458cfea55ccaa48768989c9d077b6b6 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Fri, 5 Jan 2018 03:51:19 +0100 Subject: [PATCH] ioprio.c: use xsprintf instead of sprintf * ioprio.c: Include "xstring.h". (sprint_ioprio): Replace sprintf with xsprintf. --- ioprio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ioprio.c b/ioprio.c index 682a7b3b..583f022c 100644 --- a/ioprio.c +++ b/ioprio.c @@ -27,6 +27,7 @@ */ #include "defs.h" +#include "xstring.h" enum { IOPRIO_WHO_PROCESS = 1, @@ -62,10 +63,10 @@ sprint_ioprio(unsigned int ioprio) data = IOPRIO_PRIO_DATA(ioprio); str = xlookup(ioprio_class, class); if (str) - sprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", str, data); + xsprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", str, data); else - sprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */, %d)", - class, "IOPRIO_CLASS_???", data); + xsprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */, %d)", + class, "IOPRIO_CLASS_???", data); return outstr; }