summaryrefslogtreecommitdiff
path: root/shared-module/os
diff options
context:
space:
mode:
authorDavePutz <dwputz@gmail.com>2021-01-21 16:07:24 -0600
committerGitHub <noreply@github.com>2021-01-21 16:07:24 -0600
commit6043fdf94085bf2ec00e9f95149a74fb7eb0c7c4 (patch)
tree49fb85346b3ce60a08ad7780b8aec7fd0f72366f /shared-module/os
parente424c8424936ded83803b098229d0787903f9f92 (diff)
parent2249a33203339803c8a0b23e80eec15d77b7f23e (diff)
Merge pull request #39 from adafruit/main
Merge from adafruit main for RP2040
Diffstat (limited to 'shared-module/os')
-rw-r--r--shared-module/os/__init__.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/shared-module/os/__init__.c b/shared-module/os/__init__.c
index 39cf40fda..159b54e31 100644
--- a/shared-module/os/__init__.c
+++ b/shared-module/os/__init__.c
@@ -42,6 +42,7 @@
// Version of mp_vfs_lookup_path that takes and returns uPy string objects.
STATIC mp_vfs_mount_t *lookup_path(const char* path, mp_obj_t *path_out) {
const char *p_out;
+ *path_out = mp_const_none;
mp_vfs_mount_t *vfs = mp_vfs_lookup_path(path, &p_out);
if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) {
*path_out = mp_obj_new_str_of_type(&mp_type_str,
@@ -53,6 +54,7 @@ STATIC mp_vfs_mount_t *lookup_path(const char* path, mp_obj_t *path_out) {
// Strip off trailing slashes to please underlying libraries
STATIC mp_vfs_mount_t *lookup_dir_path(const char* path, mp_obj_t *path_out) {
const char *p_out;
+ *path_out = mp_const_none;
mp_vfs_mount_t *vfs = mp_vfs_lookup_path(path, &p_out);
if (vfs != MP_VFS_NONE && vfs != MP_VFS_ROOT) {
size_t len = strlen(p_out);