]> granicus.if.org Git - strace/blobdiff - ioprio.c
Fix the length argument passed from print_iovec to decode_netlink
[strace] / ioprio.c
index 0a1a5967019d5903472f763501d1bee439358e71..0b83be7ae66644bacd30c3cbd3a93cf03c991e8d 100644 (file)
--- a/ioprio.c
+++ b/ioprio.c
@@ -51,19 +51,19 @@ enum {
 #define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK)
 
 static const char *
-sprint_ioprio(int ioprio)
+sprint_ioprio(unsigned int ioprio)
 {
        static char outstr[256];
        const char *str;
-       int class, data;
+       unsigned int class, data;
 
        class = IOPRIO_PRIO_CLASS(ioprio);
        data = IOPRIO_PRIO_DATA(ioprio);
        str = xlookup(ioprio_class, class);
        if (str)
-               sprintf(outstr, "IOPRIO_PRIO_VALUE(%s,%d)", str, data);
+               sprintf(outstr, "IOPRIO_PRIO_VALUE(%s, %d)", str, data);
        else
-               sprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */,%d)",
+               sprintf(outstr, "IOPRIO_PRIO_VALUE(%#x /* %s */, %d)",
                        class, "IOPRIO_CLASS_???", data);
 
        return outstr;