Hi!
> -     if (no_xfs) {
> -             diob.d_miniosz = stb.st_blksize;
> -             diob.d_maxiosz = stb.st_blksize * 256;  /* good number ? */
> -             diob.d_mem = stb.st_blksize;
> -     }
> +     diob.d_miniosz = stb.st_blksize;
> +     diob.d_maxiosz = stb.st_blksize * 256;  /* good number ? */
> +     diob.d_mem = stb.st_blksize;

Hmm, why you are removing the if (no_xfs) here (I don't say it's wrong,
I only want to know why)?

>  #ifndef NO_XFS
>       else if (ioctl(fd, XFS_IOC_DIOINFO, &diob) < 0) {
>               if (v)
> @@ -1826,7 +1824,13 @@ dread_f(int opno, long r)
>               len = align;
>       else if (len > diob.d_maxiosz)
>               len = diob.d_maxiosz;
> -     buf = memalign(diob.d_mem, len);
> +     if (posix_memalign((void **)buf, diob.d_mem, len) != 0) {

The posix_memalign() actually returns pointer to the memory via buf, so
instead of (void **)buf, you should write &buf (and that would silence
the warning about uninitalized buf too).

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to