Fix incorrect calls to memset.

Found when compiling libunwind with clang.

Signed-off-by: Paul Pluzhnikov <ppluzhnikov@google.com>
This commit is contained in:
Arun 2011-10-02 22:43:28 -07:00
parent 962366dace
commit f89fb17695
7 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
break;
}
memset (sloc, 0, sizeof (sloc));
memset (sloc, 0, sizeof (*sloc));
if (DWARF_IS_NULL_LOC (loc))
{

View File

@ -35,7 +35,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
#warning FIX ME!
memset (sloc, 0, sizeof (sloc));
memset (sloc, 0, sizeof (*sloc));
if (DWARF_IS_NULL_LOC (loc))
{

View File

@ -142,7 +142,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
break;
}
memset (sloc, 0, sizeof (sloc));
memset (sloc, 0, sizeof (*sloc));
if (IA64_IS_NULL_LOC (loc))
{

View File

@ -75,7 +75,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
break;
}
memset (sloc, 0, sizeof (sloc));
memset (sloc, 0, sizeof (*sloc));
if (DWARF_IS_NULL_LOC (loc))
{

View File

@ -109,7 +109,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
break;
}
memset (sloc, 0, sizeof (sloc));
memset (sloc, 0, sizeof (*sloc));
if (DWARF_IS_NULL_LOC (loc))
{

View File

@ -49,7 +49,7 @@ unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
break;
}
memset (sloc, 0, sizeof (sloc));
memset (sloc, 0, sizeof (*sloc));
if (DWARF_IS_NULL_LOC (loc))
{

View File

@ -72,7 +72,7 @@ access_fpreg (unw_addr_space_t as, unw_regnum_t regnum, unw_fpreg_t *valp,
int write, void *arg)
{
if (!write)
memset (valp, 0, sizeof (valp));
memset (valp, 0, sizeof (*valp));
return 0;
}