mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 16:14:16 +01:00 
			
		
		
		
	lfs_stat: Cast error return codes to int.
For correctness, cast the lfs_stag_t variables to int when returning a negative error code.
This commit is contained in:
		
							
								
								
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -3076,7 +3076,7 @@ int lfs_stat(lfs_t *lfs, const char *path, struct lfs_info *info) { | |||||||
|     lfs_stag_t tag = lfs_dir_find(lfs, &cwd, &path, NULL); |     lfs_stag_t tag = lfs_dir_find(lfs, &cwd, &path, NULL); | ||||||
|     if (tag < 0) { |     if (tag < 0) { | ||||||
|         LFS_TRACE("lfs_stat -> %d", tag); |         LFS_TRACE("lfs_stat -> %d", tag); | ||||||
|         return tag; |         return (int)tag; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     int err = lfs_dir_getinfo(lfs, &cwd, lfs_tag_id(tag), info); |     int err = lfs_dir_getinfo(lfs, &cwd, lfs_tag_id(tag), info); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user