From 8e600504449d3e6b7543d9cb94e50d1d9d9ee98c Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 24 Dec 2021 10:39:15 +0000 Subject: [PATCH] First of many fixes to come. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15248 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/vfs/drivers/overlay/drvoverlay.h | 2 +- os/vfs/include/vfserrors.h | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/os/vfs/drivers/overlay/drvoverlay.h b/os/vfs/drivers/overlay/drvoverlay.h index e27252be6..e624f1a8a 100644 --- a/os/vfs/drivers/overlay/drvoverlay.h +++ b/os/vfs/drivers/overlay/drvoverlay.h @@ -112,7 +112,7 @@ typedef struct vfs_overlay_dir_node { /* Path prefix for the overlaid driver or NULL.*/ \ const char *path_prefix ; \ /* Current directory or NULL.*/ \ - char *path_cwd; \ + char *path_cwd; \ /* Buffer for absolute current directory or NULL. Contains the prefix plus the current directory normalized.*/ \ char *cwd_buffer; \ diff --git a/os/vfs/include/vfserrors.h b/os/vfs/include/vfserrors.h index e4efc7344..8380313da 100644 --- a/os/vfs/include/vfserrors.h +++ b/os/vfs/include/vfserrors.h @@ -77,16 +77,13 @@ /* Module macros. */ /*===========================================================================*/ -#define VFS_BREAK_ON_ERROR(err) do { \ - if ((err) < VFS_RET_SUCCESS) { \ - break; \ - } \ -} while (false) +#define VFS_BREAK_ON_ERROR(err) \ + if ((err) < VFS_RET_SUCCESS) break #define VFS_RETURN_ON_ERROR(err) do { \ - msg_t ret = (err); \ - if (ret < VFS_RET_SUCCESS) { \ - return ret; \ + msg_t __ret = (err); \ + if (__ret < VFS_RET_SUCCESS) { \ + return __ret; \ } \ } while (false)