summaryrefslogtreecommitdiff
path: root/os-posix.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-28 00:45:33 -0400
committerpommicket <pommicket@gmail.com>2025-09-28 00:46:21 -0400
commit3c9e139aec08d1bb406a6219122ca982b4b7dc34 (patch)
tree4d7993152bbb76f1d8b7df6de45fb032332b94d0 /os-posix.c
parente78bf3013ddb588638a93bed1f6eff4d0beb5106 (diff)
Remove trailing white space in source files
Diffstat (limited to 'os-posix.c')
-rw-r--r--os-posix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/os-posix.c b/os-posix.c
index fa14584..b9050d7 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -20,7 +20,7 @@ static FsType statbuf_path_type(const struct stat *statbuf) {
return FS_FILE;
if (S_ISDIR(statbuf->st_mode))
return FS_DIRECTORY;
- return FS_OTHER;
+ return FS_OTHER;
}
FsType fs_path_type(const char *path) {
@@ -84,7 +84,7 @@ FsDirectoryEntry **fs_list_directory(const char *dirname) {
default:
entry->type = FS_OTHER;
}
- if (idx < nentries) // this could actually fail if someone creates files between calculating nentries and here.
+ if (idx < nentries) // this could actually fail if someone creates files between calculating nentries and here.
entries[idx++] = entry;
}
}
@@ -96,16 +96,16 @@ FsDirectoryEntry **fs_list_directory(const char *dirname) {
int fs_mkdir(const char *path) {
if (mkdir(path, 0755) == 0) {
- // directory created successfully
+ // directory created successfully
return 1;
} else if (errno == EEXIST) {
struct stat statbuf = {0};
if (stat(path, &statbuf) == 0) {
if (S_ISDIR(statbuf.st_mode)) {
- // already exists, and it's a directory
+ // already exists, and it's a directory
return 0;
} else {
- // already exists, but not a directory
+ // already exists, but not a directory
return -1;
}
} else {
@@ -177,7 +177,7 @@ Process *process_run_ex(const char *command, const ProcessSettings *settings) {
int stdin_pipe[2] = {0}, stdout_pipe[2] = {0}, stderr_pipe[2] = {0};
if (pipe(stdin_pipe) != 0) {
strbuf_printf(proc->error, "%s", strerror(errno));
- return proc;
+ return proc;
}
if (pipe(stdout_pipe) != 0) {
strbuf_printf(proc->error, "%s", strerror(errno));
@@ -234,7 +234,7 @@ Process *process_run_ex(const char *command, const ProcessSettings *settings) {
// so we don't need the write end of the stdout pipe or the
// read end of the stdin pipe.
close(stdout_pipe[1]);
- if (stderr_pipe[1])
+ if (stderr_pipe[1])
close(stderr_pipe[1]);
close(stdin_pipe[0]);
// set pipes to non-blocking