Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: fusl/src/process/posix_spawn_file_actions_adddup2.c

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #include <spawn.h> 1 #include <spawn.h>
2 #include <stdlib.h> 2 #include <stdlib.h>
3 #include <errno.h> 3 #include <errno.h>
4 #include "fdop.h" 4 #include "fdop.h"
5 5
6 int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *fa, int srcfd, int fd) 6 int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t* fa,
7 { 7 int srcfd,
8 » struct fdop *op = malloc(sizeof *op); 8 int fd) {
9 » if (!op) return ENOMEM; 9 struct fdop* op = malloc(sizeof *op);
10 » op->cmd = FDOP_DUP2; 10 if (!op)
11 » op->srcfd = srcfd; 11 return ENOMEM;
12 » op->fd = fd; 12 op->cmd = FDOP_DUP2;
13 » if ((op->next = fa->__actions)) op->next->prev = op; 13 op->srcfd = srcfd;
14 » op->prev = 0; 14 op->fd = fd;
15 » fa->__actions = op; 15 if ((op->next = fa->__actions))
16 » return 0; 16 op->next->prev = op;
17 op->prev = 0;
18 fa->__actions = op;
19 return 0;
17 } 20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698