]> granicus.if.org Git - strace/commitdiff
tests/sched_xetparam.c: print syscall() result using %ld format
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 21:17:46 +0000 (21:17 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 21 Apr 2016 22:05:56 +0000 (22:05 +0000)
tests/sched_xetparam.c

index d075a35e15461e574a337f922d0682f45583681c..e8e92e34624e66abbb47dddd942a13eafdc8b4e0 100644 (file)
 int
 main(void)
 {
-       struct sched_param *const param = tail_alloc(sizeof(struct sched_param));
-       int rc = syscall(__NR_sched_getparam, 0, param);
-       printf("sched_getparam(0, [%d]) = %d\n",
+       struct sched_param *const param =
+               tail_alloc(sizeof(struct sched_param));
+
+       long rc = syscall(__NR_sched_getparam, 0, param);
+       printf("sched_getparam(0, [%d]) = %ld\n",
               param->sched_priority, rc);
 
        param->sched_priority = -1;
        rc = syscall(__NR_sched_setparam, 0, param);
-       printf("sched_setparam(0, [%d]) = %d %s (%m)\n",
-              param->sched_priority, rc,
-              errno2name());
+       printf("sched_setparam(0, [%d]) = %ld %s (%m)\n",
+              param->sched_priority, rc, errno2name());
 
        puts("+++ exited with 0 +++");
        return 0;