]> granicus.if.org Git - strace/commitdiff
tests: fix print_time_t_nsec usage in xstatx.c
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 22 Apr 2017 00:15:41 +0000 (00:15 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 22 Apr 2017 00:15:41 +0000 (00:15 +0000)
* tests/xstatx.c (print_stat): Pass tv_nsec field through
zero_extend_signed_to_ull before feeding it to print_time_t_nsec.

tests/xstatx.c

index 38f115d3c15de0efe29c967e1032a27e26c6011b..eb78ffe8e5b5b00a6e9ec1ade428f19bb92abd96 100644 (file)
@@ -202,7 +202,8 @@ print_stat(const STRUCT_STAT *st)
 
 #  define PRINT_FIELD_TIME(field)                              \
        printf(", %s=", #field);                                \
-       print_time_t_nsec(st->field.tv_sec, st->field.tv_nsec)
+       print_time_t_nsec(st->field.tv_sec,                     \
+                         zero_extend_signed_to_ull(st->field.tv_nsec))
 
        printf("{stx_mask=");
        printflags(statx_masks, st->stx_mask, "STATX_???");