Diff of /trunk/mkinitrd-magellan/busybox/e2fsprogs/old_e2fsprogs/ext2fs/ext2fs_inline.c
Parent Directory | Revision Log | Patch
revision 983 by niro, Sat Sep 1 22:45:15 2007 UTC | revision 984 by niro, Sun May 30 11:32:42 2010 UTC | |
---|---|---|
# | Line 50 errcode_t ext2fs_resize_mem(unsigned lon | Line 50 errcode_t ext2fs_resize_mem(unsigned lon |
50 | /* Use "memcpy" for pointer assignments here to avoid problems | /* Use "memcpy" for pointer assignments here to avoid problems |
51 | * with C99 strict type aliasing rules. */ | * with C99 strict type aliasing rules. */ |
52 | memcpy(&p, ptr, sizeof (p)); | memcpy(&p, ptr, sizeof (p)); |
53 | p = realloc(p, size); | p = xrealloc(p, size); |
if (!p) | ||
return EXT2_ET_NO_MEMORY; | ||
54 | memcpy(ptr, &p, sizeof (p)); | memcpy(ptr, &p, sizeof (p)); |
55 | return 0; | return 0; |
56 | } | } |
|