mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	lfs: initialize file offs field
The uninitialized value creates confusion when diagnosing anomalies. Signed-off-by: Peter A. Bigot <pab@pabigot.com>
This commit is contained in:
		
							
								
								
									
										1
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -2329,6 +2329,7 @@ int lfs_file_opencfg(lfs_t *lfs, lfs_file_t *file, | |||||||
|     file->cfg = cfg; |     file->cfg = cfg; | ||||||
|     file->flags = flags | LFS_F_OPENED; |     file->flags = flags | LFS_F_OPENED; | ||||||
|     file->pos = 0; |     file->pos = 0; | ||||||
|  |     file->off = 0; | ||||||
|     file->cache.buffer = NULL; |     file->cache.buffer = NULL; | ||||||
|  |  | ||||||
|     // allocate entry for file if it doesn't exist |     // allocate entry for file if it doesn't exist | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user