From: Eugene Syromyatnikov Date: Fri, 5 Jan 2018 02:51:19 +0000 (+0100) Subject: ioprio.c: use xsprintf instead of sprintf X-Git-Tag: v4.21~217 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f1eafe8e458cfea55ccaa48768989c9d077b6b6;p=strace ioprio.c: use xsprintf instead of sprintf * ioprio.c: Include "xstring.h". (sprint_ioprio): Replace sprintf with xsprintf. --- 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; }