Remove use of set_errno() from application code.

The normal assignment errno = errcode should work fine now.
This commit is contained in:
Gregory Nutt 2020-05-07 14:07:08 -06:00 committed by Abdelatif Guettouche
parent 8a92862e03
commit b2d8c501f6
13 changed files with 105 additions and 210 deletions

View File

@ -228,6 +228,6 @@ errout_with_attrs:
posix_spawnattr_destroy(&attr); posix_spawnattr_destroy(&attr);
errout_with_errno: errout_with_errno:
set_errno(ret); errno = ret;
return ERROR; return ERROR;
} }

View File

@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* apps/fsutils/mkfatfs/writefat.c * apps/fsutils/mkfatfs/writefat.c
* *
* Copyright (C) 2008-2009, 2013, 2017 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@ -382,7 +367,7 @@ errout:
if (ret < 0) if (ret < 0)
{ {
set_errno(-ret); errno = -ret;
return ERROR; return ERROR;
} }

View File

@ -116,7 +116,7 @@ int issmartfs(FAR const char *pathname)
if (!(fmt.flags & SMART_FMT_ISFORMATTED)) if (!(fmt.flags & SMART_FMT_ISFORMATTED))
{ {
set_errno(EFTYPE); errno = EFTYPE;
ret = ERROR; ret = ERROR;
goto out; goto out;
} }
@ -246,7 +246,7 @@ errout:
if (ret < 0) if (ret < 0)
{ {
set_errno(-ret); errno = -ret;
return ERROR; return ERROR;
} }

View File

@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* apps/netutils/ftpc/ftpc_connect.c * apps/netutils/ftpc/ftpc_connect.c
* *
* Copyright (C) 2011 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@ -74,7 +59,7 @@ SESSION ftpc_connect(FAR union ftpc_sockaddr_u *server)
if (!session) if (!session)
{ {
nerr("ERROR: Failed to allocate a session\n"); nerr("ERROR: Failed to allocate a session\n");
set_errno(ENOMEM); errno = ENOMEM;
goto errout; goto errout;
} }

View File

@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* apps/netutils/ftpc/ftpc_login.c * apps/netutils/ftpc/ftpc_login.c
* *
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@ -130,7 +115,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login)
return OK; return OK;
errout_with_err: errout_with_err:
set_errno(errcode); errno = errcode;
errout: errout:
return ERROR; return ERROR;
} }

View File

@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* netutils/netlib/netlib_autoconfig.c * netutils/netlib/netlib_autoconfig.c
* *
* Copyright (C) 2015 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@ -99,7 +84,7 @@ int netlib_icmpv6_autoconfiguration(FAR const char *ifname)
{ {
/* No interface name */ /* No interface name */
set_errno(EINVAL); errno = EINVAL;
} }
return ret; return ret;

View File

@ -134,7 +134,7 @@ int tftpget_cb(FAR const char *remote, in_addr_t addr, bool binary,
if (!packet) if (!packet)
{ {
nerr("ERROR: packet memory allocation failure\n"); nerr("ERROR: packet memory allocation failure\n");
set_errno(ENOMEM); errno = ENOMEM;
return result; return result;
} }

View File

@ -297,7 +297,7 @@ int tftpput_cb(FAR const char *remote, in_addr_t addr, bool binary,
if (!packet) if (!packet)
{ {
nerr("ERROR: packet memory allocation failure\n"); nerr("ERROR: packet memory allocation failure\n");
set_errno(ENOMEM); errno = ENOMEM;
goto errout; goto errout;
} }
@ -342,7 +342,7 @@ int tftpput_cb(FAR const char *remote, in_addr_t addr, bool binary,
if (++retry > TFTP_RETRIES) if (++retry > TFTP_RETRIES)
{ {
nerr("ERROR: Retry count exceeded\n"); nerr("ERROR: Retry count exceeded\n");
set_errno(ETIMEDOUT); errno = ETIMEDOUT;
goto errout_with_sd; goto errout_with_sd;
} }
} }
@ -409,7 +409,7 @@ int tftpput_cb(FAR const char *remote, in_addr_t addr, bool binary,
if (++retry > TFTP_RETRIES) if (++retry > TFTP_RETRIES)
{ {
nerr("ERROR: Retry count exceeded\n"); nerr("ERROR: Retry count exceeded\n");
set_errno(ETIMEDOUT); errno = ETIMEDOUT;
goto errout_with_sd; goto errout_with_sd;
} }
} }

View File

@ -495,7 +495,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
{ {
nwarn("WARNING: Malformed HTTP URL: %s\n", url); nwarn("WARNING: Malformed HTTP URL: %s\n", url);
free(ws); free(ws);
set_errno(-ret); errno = -ret;
return ERROR; return ERROR;
} }
@ -697,7 +697,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen,
return OK; return OK;
errout_with_errno: errout_with_errno:
set_errno(-ret); errno = -ret;
errout: errout:
close(sockfd); close(sockfd);
free(ws); free(ws);

View File

@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* apps/nshlib/nsh_fileapps.c * apps/nshlib/nsh_fileapps.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@ -284,7 +269,7 @@ errout:
{ {
/* Set the errno value and return -1 */ /* Set the errno value and return -1 */
set_errno(ret); errno = ret;
ret = ERROR; ret = ERROR;
} }
else if (ret < 0) else if (ret < 0)

View File

@ -132,7 +132,7 @@ int platform_setconfig(enum config_data_e id, int instance,
{ {
/* Error opening the file */ /* Error opening the file */
set_errno(ENOENT); errno = ENOENT;
return -1; return -1;
} }
@ -162,7 +162,7 @@ int platform_setconfig(enum config_data_e id, int instance,
break; break;
} }
set_errno(ENOSYS); errno = ENOSYS;
return -1; return -1;
#endif /* CONFIG_MIKROE_STM32F4_CONFIGDATA_PART */ #endif /* CONFIG_MIKROE_STM32F4_CONFIGDATA_PART */
@ -254,7 +254,7 @@ int platform_getconfig(enum config_data_e id, int instance,
{ {
/* Error opening the file */ /* Error opening the file */
set_errno(ENOENT); errno = ENOENT;
return -1; return -1;
} }
@ -269,7 +269,7 @@ int platform_getconfig(enum config_data_e id, int instance,
{ {
/* Error! Not enough data in the file */ /* Error! Not enough data in the file */
set_errno(EINVAL); errno = EINVAL;
fclose(fd); fclose(fd);
return -1; return -1;
} }
@ -291,7 +291,7 @@ int platform_getconfig(enum config_data_e id, int instance,
break; break;
} }
set_errno(ENOSYS); errno = ENOSYS;
return -1; return -1;
#endif /* CONFIG_MIKROE_STM32F4_CONFIGDATA_PART */ #endif /* CONFIG_MIKROE_STM32F4_CONFIGDATA_PART */

View File

@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* apps/popen/popen/popen.c * apps/popen/popen/popen.c
* *
* Copyright (C) 2018 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@ -313,7 +298,7 @@ errout_with_container:
free(container); free(container);
errout: errout:
set_errno(errcode); errno = errcode;
return NULL; return NULL;
} }

View File

@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* apps/system/system/system.c * apps/system/system/system.c
* *
* Copyright (C) 2016 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@ -179,6 +164,6 @@ errout_with_attrs:
posix_spawnattr_destroy(&attr); posix_spawnattr_destroy(&attr);
errout: errout:
set_errno(errcode); errno = errcode;
return ERROR; return ERROR;
} }