mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Removed dependency on uninitialized value in lfs_file_t struct
This commit is contained in:
		
							
								
								
									
										3
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -2308,9 +2308,6 @@ int lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file, | ||||
|             (void*)lfs, (void*)file, path, flags, | ||||
|             (void*)cfg, cfg->buffer, (void*)cfg->attrs, cfg->attr_count); | ||||
|  | ||||
|     // do not allow open for already opened file | ||||
|     LFS_ASSERT(0 == (file->flags & LFS_F_OPENED)); | ||||
|  | ||||
|     // deorphan if we haven't yet, needed at most once after poweron | ||||
|     if ((flags & 3) != LFS_O_RDONLY) { | ||||
|         int err = lfs_fs_forceconsistency(lfs); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user