]> git.hungrycats.org Git - linux/commitdiff
[PATCH] gcc-3.5: hfs fixes
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Feb 2004 02:35:38 +0000 (18:35 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 4 Feb 2004 02:35:38 +0000 (18:35 -0800)
fs/hfs/file_hdr.c: In function `dup_layout':
fs/hfs/file_hdr.c:246: error: invalid lvalue in assignment

fs/hfs/file_hdr.c

index e154dcfea1d1e15a09e3787baa62f09d4e805cfb..b39484939f9b014bf222cd39b0871f848f082c8f 100644 (file)
@@ -243,7 +243,8 @@ static struct hfs_hdr_layout *dup_layout(const struct hfs_hdr_layout *old)
        if (HFS_NEW(new)) {
                memcpy(new, old, sizeof(*new));
                for (lcv = 0; lcv < new->entries; ++lcv) {
-                       (char *)(new->order[lcv]) += (char *)new - (char *)old;
+                       new->order[lcv] = (struct hfs_hdr_descr *)
+                       ((char *)new->order[lcv] + ((char *)new - (char *)old));
                }
        }
        return new;