]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filejournal: fix type punning warning, drop unneeded cast
authorSage Weil <sage.weil@dreamhost.com>
Thu, 24 Feb 2011 14:12:02 +0000 (06:12 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 24 Feb 2011 14:12:42 +0000 (06:12 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/os/FileJournal.cc

index d46c5dcb50f63a5ceef6ae2a0411eab06a9b9b9f..f6505af6d2173ff3d998ad95f9755dae70394cf5 100644 (file)
@@ -299,7 +299,7 @@ int FileJournal::_open_file(int64_t oldsize, blksize_t blksize,
 
 int FileJournal::create()
 {
-  char *buf = 0;
+  void *buf = 0;
   int64_t needed_space;
   int ret;
   buffer::ptr bp;
@@ -331,7 +331,7 @@ int FileJournal::create()
   }
 
   // zero first little bit, too.
-  ret = posix_memalign((void**)&buf, block_size, block_size);
+  ret = posix_memalign(&buf, block_size, block_size);
   if (ret) {
     derr << "FileJournal::create: failed to allocate " << block_size
         << " bytes of memory: " << cpp_strerror(ret) << dendl;