mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling 1. Add semaphore uninterruptible wait function 2 .Replace semaphore wait loop with a single uninterruptible wait 3. Replace all sem_xxx to nxsem_xxx * Unify the void cast usage 1. Remove void cast for function because many place ignore the returned value witout cast 2. Replace void cast for variable with UNUSED macro
This commit is contained in:
@@ -325,10 +325,10 @@ int net_delroute_ipv4(in_addr_t target, in_addr_t netmask)
|
||||
ret = file_truncate(&fshandle, filesize);
|
||||
|
||||
errout_with_fshandle:
|
||||
(void)net_closeroute_ipv4(&fshandle);
|
||||
net_closeroute_ipv4(&fshandle);
|
||||
|
||||
errout_with_lock:
|
||||
(void)net_unlockroute_ipv4();
|
||||
net_unlockroute_ipv4();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
@@ -474,10 +474,10 @@ int net_delroute_ipv6(net_ipv6addr_t target, net_ipv6addr_t netmask)
|
||||
ret = file_truncate(&fshandle, filesize);
|
||||
|
||||
errout_with_fshandle:
|
||||
(void)net_closeroute_ipv6(&fshandle);
|
||||
net_closeroute_ipv6(&fshandle);
|
||||
|
||||
errout_with_lock:
|
||||
(void)net_unlockroute_ipv6();
|
||||
net_unlockroute_ipv6();
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user