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

Side by Side Diff: fusl/src/process/posix_spawn_file_actions_addclose.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_addclose(posix_spawn_file_actions_t *fa, int fd) 6 int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t* fa, int fd) {
7 { 7 struct fdop* op = malloc(sizeof *op);
8 » struct fdop *op = malloc(sizeof *op); 8 if (!op)
9 » if (!op) return ENOMEM; 9 return ENOMEM;
10 » op->cmd = FDOP_CLOSE; 10 op->cmd = FDOP_CLOSE;
11 » op->fd = fd; 11 op->fd = fd;
12 » if ((op->next = fa->__actions)) op->next->prev = op; 12 if ((op->next = fa->__actions))
13 » op->prev = 0; 13 op->next->prev = op;
14 » fa->__actions = op; 14 op->prev = 0;
15 » return 0; 15 fa->__actions = op;
16 return 0;
16 } 17 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698