From f1e65b449ec802863f0e7fcbe211fc67bf0a65f3 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 27 Sep 2016 08:35:45 -0700 Subject: [PATCH] Sdcard: Do not use fuse padding field Instead default-initialize to 0. The third field, which is by default padding, may be renamed and used in some implementations. Test: m Change-Id: Iaf0a2b1bf9615f11256c0500fa3ca98b09e34d15 --- sdcard/fuse.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sdcard/fuse.cpp b/sdcard/fuse.cpp index f549606a9..f6dad8ae8 100644 --- a/sdcard/fuse.cpp +++ b/sdcard/fuse.cpp @@ -982,7 +982,7 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler, { struct node* node; char path[PATH_MAX]; - struct fuse_open_out out; + struct fuse_open_out out = {}; struct handle *h; pthread_mutex_lock(&fuse->global->lock); @@ -1011,7 +1011,6 @@ static int handle_open(struct fuse* fuse, struct fuse_handler* handler, } out.fh = ptr_to_id(h); out.open_flags = 0; - out.padding = 0; fuse_reply(fuse, hdr->unique, &out, sizeof(out)); return NO_STATUS; } @@ -1148,7 +1147,7 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler, { struct node* node; char path[PATH_MAX]; - struct fuse_open_out out; + struct fuse_open_out out = {}; struct dirhandle *h; pthread_mutex_lock(&fuse->global->lock); @@ -1175,7 +1174,6 @@ static int handle_opendir(struct fuse* fuse, struct fuse_handler* handler, } out.fh = ptr_to_id(h); out.open_flags = 0; - out.padding = 0; fuse_reply(fuse, hdr->unique, &out, sizeof(out)); return NO_STATUS; }