mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
sched/: Fix some spacing issues
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
|
||||
int clearenv(void)
|
||||
{
|
||||
FAR struct tcb_s *tcb = (FAR struct tcb_s*)g_readytorun.head;
|
||||
FAR struct tcb_s *tcb = (FAR struct tcb_s *)g_readytorun.head;
|
||||
DEBUGASSERT(tcb->group);
|
||||
|
||||
env_release(tcb->group);
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
int env_dup(FAR struct task_group_s *group)
|
||||
{
|
||||
FAR struct tcb_s *ptcb = (FAR struct tcb_s*)g_readytorun.head;
|
||||
FAR struct tcb_s *ptcb = (FAR struct tcb_s *)g_readytorun.head;
|
||||
FAR char *envp = NULL;
|
||||
size_t envlen;
|
||||
int ret = OK;
|
||||
|
||||
@@ -67,7 +67,7 @@ static bool env_cmpname(const char *pszname, const char *peqname)
|
||||
|
||||
/* On sucess, pszname will end with '\0' and peqname with '=' */
|
||||
|
||||
if ( *pszname == '\0' && *peqname == '=' )
|
||||
if (*pszname == '\0' && *peqname == '=')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -94,12 +94,12 @@ FAR char *getenv(const char *name)
|
||||
/* Get a reference to the thread-private environ in the TCB. */
|
||||
|
||||
sched_lock();
|
||||
rtcb = (FAR struct tcb_s*)g_readytorun.head;
|
||||
rtcb = (FAR struct tcb_s *)g_readytorun.head;
|
||||
group = rtcb->group;
|
||||
|
||||
/* Check if the variable exists */
|
||||
|
||||
if ( !group || (pvar = env_findvar(group, name)) == NULL)
|
||||
if (!group || (pvar = env_findvar(group, name)) == NULL)
|
||||
{
|
||||
ret = ENOENT;
|
||||
goto errout_with_lock;
|
||||
@@ -130,4 +130,3 @@ errout:
|
||||
}
|
||||
|
||||
#endif /* CONFIG_DISABLE_ENVIRON */
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR char **get_environ_ptr( void )
|
||||
FAR char **get_environ_ptr(void)
|
||||
{
|
||||
#if 1
|
||||
|
||||
@@ -85,7 +85,7 @@ FAR char **get_environ_ptr( void )
|
||||
|
||||
/* Return a reference to the thread-private environ in the TCB. */
|
||||
|
||||
FAR struct tcb_s *ptcb = (FAR struct tcb_s*)g_readytorun.head;
|
||||
FAR struct tcb_s *ptcb = (FAR struct tcb_s *)g_readytorun.head;
|
||||
if (ptcb->envp)
|
||||
{
|
||||
return &ptcb->envp->ev_env;
|
||||
|
||||
@@ -100,7 +100,7 @@ int putenv(FAR const char *string)
|
||||
goto errout;
|
||||
}
|
||||
|
||||
pequal = strchr( pname, '=');
|
||||
pequal = strchr(pname, '=');
|
||||
if (pequal)
|
||||
{
|
||||
/* Then let setenv do all of the work */
|
||||
|
||||
@@ -124,7 +124,7 @@ int setenv(FAR const char *name, FAR const char *value, int overwrite)
|
||||
/* Get a reference to the thread-private environ in the TCB. */
|
||||
|
||||
sched_lock();
|
||||
rtcb = (FAR struct tcb_s*)g_readytorun.head;
|
||||
rtcb = (FAR struct tcb_s *)g_readytorun.head;
|
||||
group = rtcb->group;
|
||||
DEBUGASSERT(group);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
int unsetenv(FAR const char *name)
|
||||
{
|
||||
FAR struct tcb_s *rtcb = (FAR struct tcb_s*)g_readytorun.head;
|
||||
FAR struct tcb_s *rtcb = (FAR struct tcb_s *)g_readytorun.head;
|
||||
FAR struct task_group_s *group = rtcb->group;
|
||||
FAR char *pvar;
|
||||
FAR char *newenvp;
|
||||
|
||||
Reference in New Issue
Block a user