aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/c/exec.c
diff options
context:
space:
mode:
authorpacien2018-08-05 22:12:46 +0200
committerpacien2018-08-05 22:12:46 +0200
commit9012ef92ed810f4a08b5f01cd2c18430a277eacf (patch)
tree7e2dc8f9b61698e895fab07bc524575af5ec484b /app/src/main/c/exec.c
parenta9d1ac81374119e33871484c8749a94d11a71cae (diff)
downloadtincapp-9012ef92ed810f4a08b5f01cd2c18430a277eacf.tar.gz
Code style
Diffstat (limited to 'app/src/main/c/exec.c')
-rw-r--r--app/src/main/c/exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/c/exec.c b/app/src/main/c/exec.c
index 838135c..5e92b11 100644
--- a/app/src/main/c/exec.c
+++ b/app/src/main/c/exec.c
@@ -40,11 +40,11 @@ static inline void exec(const char **argcv) {
40} 40}
41 41
42JNIEXPORT jint JNICALL 42JNIEXPORT jint JNICALL
43Java_org_pacien_tincapp_commands_Executor_forkExec(JNIEnv *env, jclass class, jobjectArray argcv) { 43Java_org_pacien_tincapp_commands_Executor_forkExec(JNIEnv *env, __attribute__((unused)) jclass class, jobjectArray args) {
44 pid_t pid = fork(); 44 pid_t pid = fork();
45 switch (pid) { 45 switch (pid) {
46 case 0: 46 case 0:
47 exec(to_string_array(env, argcv)); 47 exec(to_string_array(env, args));
48 return 0; 48 return 0;
49 49
50 default: 50 default:
@@ -53,7 +53,7 @@ Java_org_pacien_tincapp_commands_Executor_forkExec(JNIEnv *env, jclass class, jo
53} 53}
54 54
55JNIEXPORT jint JNICALL 55JNIEXPORT jint JNICALL
56Java_org_pacien_tincapp_commands_Executor_wait(JNIEnv *env, jclass class, jint pid) { 56Java_org_pacien_tincapp_commands_Executor_wait(__attribute__((unused))JNIEnv *env, __attribute__((unused)) jclass class, jint pid) {
57 int status; 57 int status;
58 waitpid(pid, &status, 0); 58 waitpid(pid, &status, 0);
59 return WIFEXITED(status) ? WEXITSTATUS(status) : -1; 59 return WIFEXITED(status) ? WEXITSTATUS(status) : -1;