X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fzerosize-ptr.h;h=beeb3da3e0d609c2ee8c7ec517fda5f136a04005;hb=78d7019b3d120e25182983e78dea23e7b9fbc47b;hp=a38a2cf4941ab810d59019f69b9458f8d66bcebe;hpb=5709a7204dfd9a4fedf2cdbaa341bc6c540dadf3;p=gnulib.git diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h index a38a2cf49..beeb3da3e 100644 --- a/tests/zerosize-ptr.h +++ b/tests/zerosize-ptr.h @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -57,11 +57,11 @@ zerosize_ptr (void) { int pagesize = getpagesize (); char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); + (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, + flags, fd, 0); if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - return two_pages + pagesize; + && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) + return two_pages + pagesize; } #endif return NULL;