Skip to content

Commit 32e50de

Browse files
chdir_fildes=-1; removed struct fchdir
1 parent 481a7dc commit 32e50de

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

userland/posix_spawn_fileactions.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ int
176176
posix_spawn_file_actions_addchdir(posix_spawn_file_actions_t * __restrict fa,
177177
const char * __restrict path)
178178
{
179-
char* dirpath;
179+
char *dirpath;
180180
unsigned int i;
181181
int error;
182182

@@ -190,6 +190,7 @@ posix_spawn_file_actions_addchdir(posix_spawn_file_actions_t * __restrict fa,
190190

191191
fa->fae[i].fae_action = FAE_CHDIR;
192192
fa->fae[i].fae_chdir_path = dirpath;
193+
fa->fae[i].fae_fildes = -1;
193194
fa->len++;
194195

195196
return 0;
@@ -209,7 +210,7 @@ posix_spawn_file_actions_addfchdir(posix_spawn_file_actions_t *fa, int fildes)
209210
return error;
210211

211212
fa->fae[i].fae_action = FAE_FCHDIR;
212-
fa->fae[i].fae_fchdir_fildes = fildes;
213+
fa->fae[i].fae_fildes = fildes;
213214
fa->len++;
214215

215216
return 0;

userland/sys-spawn.h

-4
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ typedef struct posix_spawn_file_actions_entry {
6969
char* path;
7070
#define fae_chdir_path fae_data.chdir.path
7171
} chdir;
72-
struct {
73-
int fildes;
74-
#define fae_fchdir_fildes fae_data.fchdir.fildes
75-
} fchdir;
7672
} fae_data;
7773
} posix_spawn_file_actions_entry_t;
7874

0 commit comments

Comments
 (0)