uORB/uORB; using array to save path for sensor_reginfo_s

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2024-06-28 10:32:08 +08:00 committed by Xiang Xiao
parent 9a1a8d3ca3
commit abdcb33f14
2 changed files with 2 additions and 2 deletions

View File

@ -170,5 +170,5 @@ FAR const struct orb_metadata *orb_get_meta(FAR const char *name)
return NULL;
}
return state.priv;
return (FAR const struct orb_metadata *)(uintptr_t)state.priv;
}

View File

@ -70,7 +70,7 @@ static int orb_advsub_open(FAR const struct orb_metadata *meta, int flags,
if (fd < 0)
{
struct sensor_reginfo_s reginfo;
reginfo.path = path;
strlcpy(reginfo.path, path, NAME_MAX);
reginfo.esize = meta->o_size;
reginfo.nbuffer = queue_size;
reginfo.persist = !!(flags & SENSOR_PERSIST);