diff options
Diffstat (limited to 'src/ifuse.c')
| -rw-r--r-- | src/ifuse.c | 10 |
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) { | |||
| 54 | static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, | 54 | static int ifuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler, |
| 55 | off_t offset, struct fuse_file_info *fi) { | 55 | off_t offset, struct fuse_file_info *fi) { |
| 56 | int i; | 56 | int i; |
| 57 | char **dirs; | 57 | char **dirs = NULL; |
| 58 | iphone_afc_client_t afc = fuse_get_context()->private_data; | 58 | iphone_afc_client_t afc = fuse_get_context()->private_data; |
| 59 | 59 | ||
| 60 | iphone_afc_get_dir_list(afc, path, &dirs); | 60 | 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, | |||
| 73 | 73 | ||
| 74 | static int ifuse_create(const char *path, mode_t mode, struct fuse_file_info *fi) { | 74 | static int ifuse_create(const char *path, mode_t mode, struct fuse_file_info *fi) { |
| 75 | // exactly the same as open but using a different mode | 75 | // exactly the same as open but using a different mode |
| 76 | iphone_afc_file_t file; | 76 | iphone_afc_file_t file = NULL; |
| 77 | iphone_afc_client_t afc = fuse_get_context()->private_data; | 77 | iphone_afc_client_t afc = fuse_get_context()->private_data; |
| 78 | 78 | ||
| 79 | iphone_afc_open_file(afc, path, IPHONE_AFC_FILE_WRITE, &file); | 79 | 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 | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | static int ifuse_open(const char *path, struct fuse_file_info *fi) { | 86 | static int ifuse_open(const char *path, struct fuse_file_info *fi) { |
| 87 | iphone_afc_file_t file; | 87 | iphone_afc_file_t file = NULL; |
| 88 | iphone_afc_client_t afc = fuse_get_context()->private_data; | 88 | iphone_afc_client_t afc = fuse_get_context()->private_data; |
| 89 | uint32_t mode = 0; | 89 | uint32_t mode = 0; |
| 90 | 90 | ||
| @@ -107,7 +107,7 @@ static int ifuse_open(const char *path, struct fuse_file_info *fi) { | |||
| 107 | 107 | ||
| 108 | static int ifuse_read(const char *path, char *buf, size_t size, off_t offset, | 108 | static int ifuse_read(const char *path, char *buf, size_t size, off_t offset, |
| 109 | struct fuse_file_info *fi) { | 109 | struct fuse_file_info *fi) { |
| 110 | int bytes; | 110 | int bytes = 0; |
| 111 | iphone_afc_file_t file; | 111 | iphone_afc_file_t file; |
| 112 | iphone_afc_client_t afc = fuse_get_context()->private_data; | 112 | iphone_afc_client_t afc = fuse_get_context()->private_data; |
| 113 | 113 | ||
| @@ -144,7 +144,7 @@ static int ifuse_fsync(const char *path, int datasync, struct fuse_file_info *fi | |||
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static int ifuse_release(const char *path, struct fuse_file_info *fi){ | 146 | static int ifuse_release(const char *path, struct fuse_file_info *fi){ |
| 147 | iphone_afc_file_t file; | 147 | iphone_afc_file_t file = NULL; |
| 148 | iphone_afc_client_t afc = fuse_get_context()->private_data; | 148 | iphone_afc_client_t afc = fuse_get_context()->private_data; |
| 149 | 149 | ||
| 150 | file = g_hash_table_lookup(file_handles, &(fi->fh)); | 150 | file = g_hash_table_lookup(file_handles, &(fi->fh)); |
