summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/zfs/sa.c
diff options
context:
space:
mode:
authorGeorge Wilson <george.wilson@delphix.com>2013-02-10 22:21:05 -0800
committerChristopher Siden <chris.siden@delphix.com>2013-02-10 22:21:05 -0800
commitd5285cae913f4e01ffa0e6693a6d8ef1fbea30ba (patch)
tree204af0fe922145c182507a38bd9134150541b64a /usr/src/uts/common/fs/zfs/sa.c
parent7535ae1914017b0e648abd7a139aca709fa82be3 (diff)
downloadillumos-joyent-d5285cae913f4e01ffa0e6693a6d8ef1fbea30ba.tar.gz
3522 zfs module should not allow uninitialized variables
Reviewed by: Sebastien Roy <seb@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/fs/zfs/sa.c')
-rw-r--r--usr/src/uts/common/fs/zfs/sa.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/uts/common/fs/zfs/sa.c b/usr/src/uts/common/fs/zfs/sa.c
index 7cd4ab00f7..cd3a58b5fa 100644
--- a/usr/src/uts/common/fs/zfs/sa.c
+++ b/usr/src/uts/common/fs/zfs/sa.c
@@ -660,7 +660,8 @@ sa_build_layouts(sa_handle_t *hdl, sa_bulk_attr_t *attr_desc, int attr_count,
int buf_space;
sa_attr_type_t *attrs, *attrs_start;
int i, lot_count;
- int hdrsize, spillhdrsize;
+ int hdrsize;
+ int spillhdrsize = 0;
int used;
dmu_object_type_t bonustype;
sa_lot_t *lot;
@@ -834,7 +835,7 @@ sa_attr_table_setup(objset_t *os, sa_attr_reg_t *reg_attrs, int count)
{
sa_os_t *sa = os->os_sa;
uint64_t sa_attr_count = 0;
- uint64_t sa_reg_count;
+ uint64_t sa_reg_count = 0;
int error = 0;
uint64_t attr_value;
sa_attr_table_t *tb;
@@ -1639,7 +1640,8 @@ sa_modify_attrs(sa_handle_t *hdl, sa_attr_type_t newattr,
sa_bulk_attr_t *attr_desc;
void *old_data[2];
int bonus_attr_count = 0;
- int bonus_data_size, spill_data_size;
+ int bonus_data_size = 0;
+ int spill_data_size = 0;
int spill_attr_count = 0;
int error;
uint16_t length;