convert pointer string to number in base 16
Co-authored-by: chenxiaoyi <chenxiaoyi@xiaomi.com> Co-authored-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
7ce5241f0e
commit
538582ede1
@ -330,8 +330,8 @@ static int net_rpmsg_drv_sockioctl_task(int argc, FAR char *argv[])
|
||||
|
||||
/* Restore pointers from argv */
|
||||
|
||||
ept = (FAR struct rpmsg_endpoint *)strtoul(argv[1], NULL, 0);
|
||||
msg = (FAR struct net_rpmsg_ioctl_s *)strtoul(argv[2], NULL, 0);
|
||||
ept = (FAR struct rpmsg_endpoint *)strtoul(argv[1], NULL, 16);
|
||||
msg = (FAR struct net_rpmsg_ioctl_s *)strtoul(argv[2], NULL, 16);
|
||||
|
||||
/* We need a temporary sock for ioctl here */
|
||||
|
||||
|
@ -142,7 +142,7 @@ static int goldfish_gps_activate(FAR struct gps_lowerhalf_s *gps,
|
||||
static int goldfish_gps_thread(int argc, FAR char** argv)
|
||||
{
|
||||
FAR struct goldfish_gps_s *priv = (FAR struct goldfish_gps_s *)
|
||||
((uintptr_t)strtoul(argv[1], NULL, 0));
|
||||
((uintptr_t)strtoul(argv[1], NULL, 16));
|
||||
ssize_t len;
|
||||
char buf[256];
|
||||
|
||||
|
@ -588,7 +588,7 @@ static int goldfish_sensor_activate(FAR struct sensor_lowerhalf_s *lower,
|
||||
static int goldfish_sensor_thread(int argc, FAR char** argv)
|
||||
{
|
||||
FAR struct goldfish_sensor_s *priv =
|
||||
(FAR struct goldfish_sensor_s *)((uintptr_t)strtoul(argv[1], NULL, 0));
|
||||
(FAR struct goldfish_sensor_s *)((uintptr_t)strtoul(argv[1], NULL, 16));
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
@ -136,9 +136,9 @@ static int work_thread(int argc, FAR char *argv[])
|
||||
/* Get the handle from argv */
|
||||
|
||||
wqueue = (FAR struct kwork_wqueue_s *)
|
||||
((uintptr_t)strtoul(argv[1], NULL, 0));
|
||||
((uintptr_t)strtoul(argv[1], NULL, 16));
|
||||
kworker = (FAR struct kworker_s *)
|
||||
((uintptr_t)strtoul(argv[2], NULL, 0));
|
||||
((uintptr_t)strtoul(argv[2], NULL, 16));
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user