]> sourceware.org Git - lvm2.git/commitdiff
Void* arithmetic replaced with char*
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Feb 2011 14:34:41 +0000 (14:34 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Feb 2011 14:34:41 +0000 (14:34 +0000)
WHATS_NEW
daemons/clvmd/clvmd.c
lib/format_text/text_label.c

index 706587baf844bea2f115f961f2302743987e6368..aaa100b813470c4e3e4727913ec46e9097f3a3b3 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.85 - 
 ===================================
+  Use char* arithmetic in _text_write(), _text_read() & send_message().
   Fix compilation when devmapper is dissabled.
   Remove fs_unlock() from lv_suspend error path.
   Change memory locking semantic and use critical sections.
index 8e21732e0238b6d1d43a9de248ca330527b21524..3726324c0d5fe371bb7a4a13851d911222da38b1 100644 (file)
@@ -1867,7 +1867,7 @@ static int send_message(void *buf, int msglen, const char *csid, int fd,
                                break;
                        }
 
-                       len = write(fd, buf + ptr, msglen - ptr);
+                       len = write(fd, (char*)buf + ptr, msglen - ptr);
 
                        if (len <= 0) {
                                if (errno == EINTR)
index e459cdef4a79de9627c6a8f3871bbd8fec4ab942..675dbe84e37d0826ec4c589b582fe80952fbb7dc 100644 (file)
@@ -52,7 +52,7 @@ static int _text_write(struct label *label, void *buf)
 
        strncpy((char *)lh->type, label->type, sizeof(label->type));
 
-       pvhdr = (struct pv_header *) ((void *) buf + xlate32(lh->offset_xl));
+       pvhdr = (struct pv_header *) ((char *) buf + xlate32(lh->offset_xl));
        info = (struct lvmcache_info *) label->info;
        pvhdr->device_size_xl = xlate64(info->device_size);
        memcpy(pvhdr->pv_uuid, &info->dev->pvid, sizeof(struct id));
@@ -266,7 +266,7 @@ static int _text_read(struct labeller *l, struct device *dev, void *buf,
        char *creation_host;
        struct mda_header *mdah;
 
-       pvhdr = (struct pv_header *) ((void *) buf + xlate32(lh->offset_xl));
+       pvhdr = (struct pv_header *) ((char *) buf + xlate32(lh->offset_xl));
 
        if (!(info = lvmcache_add(l, (char *)pvhdr->pv_uuid, dev,
                                  FMT_TEXT_ORPHAN_VG_NAME,
This page took 0.050672 seconds and 5 git commands to generate.