Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Galfurian committed Dec 5, 2024
2 parents 8833c9a + 4cd7ea9 commit 5781e4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mentos/src/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ char *realpath(const char *path, char *buffer, size_t buflen)
static inline int __is_a_link(const char *path)
{
stat_t statbuf;
if (vfs_stat(path, &statbuf) > 0) {
if (vfs_stat(path, &statbuf) == 0) {
return S_ISLNK(statbuf.st_mode);
}
return 0;
Expand Down
4 changes: 2 additions & 2 deletions programs/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ static char *__getenv(const char *var)

/// @brief Expands environmental variables in a string and stores the result in the buffer.
/// @param str The input string containing potential environmental variables.
/// @param str_len The length of the input string.
/// @param buf The buffer where the expanded string will be stored.
/// @param buf_len The maximum length of the buffer.
/// @param str_len The length of the input string (if provided, otherwise it will be calculated).
/// @param null_terminate If true, the resulting buffer will be null-terminated.
static void ___expand_env(char *str, size_t str_len, char *buf, size_t buf_len, bool_t null_terminate)
{
Expand Down Expand Up @@ -385,7 +385,7 @@ static void ___expand_env(char *str, size_t str_len, char *buf, size_t buf_len,
/// @param buf_len The size of the buffer.
static void __expand_env(char *str, char *buf, size_t buf_len)
{
___expand_env(str, 0, buf, buf_len, false);
___expand_env(str, strlen(str), buf, buf_len, false);
}

/// @brief Sets environment variables based on arguments.
Expand Down

0 comments on commit 5781e4d

Please sign in to comment.