Re: [PATCH v2 1/8] fsstress: Include stddef.h for ptrdiff_t

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Mon, Jan 22, 2018 at 03:57:12PM +0000, Rostislav Skudnov wrote:
> In musl C library headers ptrdiff_t is only defined in stddef.h.

It seems ptrdiff_t is only used to save the return value of xfsctl(),

	ptrdiff_t       srval;
	...
	srval = xfsctl(buf, fd, XFS_IOC_ERROR_INJECTION, &err_inj);

and xfsctl(3) shows that it returns an int.

	int xfsctl(const char *path, int fd, int cmd, void *ptr);

I think we could just change type of srval to int.

Thanks,
Eryu

>
> Signed-off-by: Rostislav Skudnov <rostislav@xxxxxxxxxx>
> ---
>  ltp/fsstress.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> index 4dea029..63c2eb4 100644
> --- a/ltp/fsstress.c
> +++ b/ltp/fsstress.c
> @@ -19,6 +19,7 @@
>  #include <linux/fs.h>
>  #include <setjmp.h>
>  #include <sys/uio.h>
> +#include <stddef.h>
>  #include "global.h"
>  
>  #ifdef HAVE_ATTR_XATTR_H
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux