This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new afca1a819d limits/path: replace CONFIG_PATH_MAX to PATH_MAX to ensure
consistency
afca1a819d is described below
commit afca1a819d8d098cd2b57591f3ee246cf7d4737b
Author: chao an <[email protected]>
AuthorDate: Tue Dec 10 12:27:08 2024 +0800
limits/path: replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency
replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency
Signed-off-by: chao an <[email protected]>
---
binfmt/binfmt_execmodule.c | 4 ++--
drivers/devicetree/fdt.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c
index 65ca7c18f6..b8fe873eaf 100644
--- a/binfmt/binfmt_execmodule.c
+++ b/binfmt/binfmt_execmodule.c
@@ -205,7 +205,7 @@ int exec_module(FAR struct binary_s *binp,
#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
FAR struct arch_addrenv_s *addrenv = &binp->addrenv->addrenv;
FAR void *vheap;
- char name[CONFIG_PATH_MAX];
+ char name[PATH_MAX];
#endif
FAR void *stackaddr = NULL;
pid_t pid;
@@ -260,7 +260,7 @@ int exec_module(FAR struct binary_s *binp,
if (argv == NULL)
{
- strlcpy(name, filename, CONFIG_PATH_MAX);
+ strlcpy(name, filename, PATH_MAX);
filename = name;
}
diff --git a/drivers/devicetree/fdt.c b/drivers/devicetree/fdt.c
index 7e44db06bb..e5df32b27a 100644
--- a/drivers/devicetree/fdt.c
+++ b/drivers/devicetree/fdt.c
@@ -39,7 +39,7 @@
/* Location of the fdt data for this system. */
-static FAR const char *g_fdt_base = NULL;
+static FAR const char *g_fdt_base;
/****************************************************************************
* Public Functions
@@ -399,7 +399,7 @@ FAR const char *fdt_get_node_label(FAR const void *fdt, int
node)
int ret;
const char *property_name;
const char *label_name;
- char path_buffer[CONFIG_PATH_MAX] =
+ char path_buffer[PATH_MAX] =
{
0
};
@@ -496,7 +496,7 @@ int fdt_node_index_from_label(FAR const char *node_label,
int count)
return -ENOENT;
}
- label_length = strnlen(node_label, CONFIG_PATH_MAX);
+ label_length = strnlen(node_label, PATH_MAX);
if (count > label_length || count <= 0)
{