summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-31 19:22:58 +0200
committerGravatar Jonathan Beck2008-08-31 19:33:19 +0200
commit95e588fae32b17debf26ceaf456b361e06011623 (patch)
tree72d75a24447666e4bb38523defa05dfe9f15ad62
parent5dc380594ad755dd5a9d2cad246e5dcb5480350d (diff)
downloadlibplist-95e588fae32b17debf26ceaf456b361e06011623.tar.gz
libplist-95e588fae32b17debf26ceaf456b361e06011623.tar.bz2
initialize local variables in ifuse.c
-rw-r--r--src/ifuse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index 353188e..ed36117 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -54,7 +54,7 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) {
static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
off_t offset, struct fuse_file_info *fi) {
int i;
- char **dirs;
+ char **dirs = NULL;
iphone_afc_client_t afc = fuse_get_context()->private_data;
iphone_afc_get_dir_list(afc, path, &dirs);
@@ -73,7 +73,7 @@ static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
static int ifuse_create(const char *path, mode_t mode, struct fuse_file_info *fi) {
// exactly the same as open but using a different mode
- iphone_afc_file_t file;
+ iphone_afc_file_t file = NULL;
iphone_afc_client_t afc = fuse_get_context()->private_data;
iphone_afc_open_file(afc, path, IPHONE_AFC_FILE_WRITE, &file);
@@ -84,7 +84,7 @@ static int ifuse_create(const char *path, mode_t mode, struct fuse_file_info *fi
}
static int ifuse_open(const char *path, struct fuse_file_info *fi) {
- iphone_afc_file_t file;
+ iphone_afc_file_t file = NULL;
iphone_afc_client_t afc = fuse_get_context()->private_data;
uint32_t mode = 0;
@@ -107,7 +107,7 @@ static int ifuse_open(const char *path, struct fuse_file_info *fi) {
static int ifuse_read(const char *path, char *buf, size_t size, off_t offset,
struct fuse_file_info *fi) {
- int bytes;
+ int bytes = 0;
iphone_afc_file_t file;
iphone_afc_client_t afc = fuse_get_context()->private_data;
@@ -144,7 +144,7 @@ static int ifuse_fsync(const char *path, int datasync, struct fuse_file_info *fi
}
static int ifuse_release(const char *path, struct fuse_file_info *fi){
- iphone_afc_file_t file;
+ iphone_afc_file_t file = NULL;
iphone_afc_client_t afc = fuse_get_context()->private_data;
file = g_hash_table_lookup(file_handles, &(fi->fh));