Supply return value for non-void function sandbox/nmerinov/llvm
authorNikolai Merinov <n.merinov@samsung.com>
Fri, 1 Feb 2019 11:12:32 +0000 (14:12 +0300)
committerNikolai Merinov <n.merinov@samsung.com>
Fri, 1 Feb 2019 15:05:44 +0000 (18:05 +0300)
profctl.c

index 74d7fdba8b61220da4464d17bd1c5c950f713633..525ef823076262c5a869f641680a11fa100b4327 100644 (file)
--- a/profctl.c
+++ b/profctl.c
@@ -104,16 +104,16 @@ static void *data_output_thread(void *arg)
                data_socket = openPort(dataPort);
                if (data_socket < 0) {
                        log_error("cannot open data port");
-                       return;
+                       return NULL;
                }
                data_file_out = fdopen(data_socket, "w");
                if (data_file_out == NULL) {
                        log_system_error("fdopen(data,w)");
-                       return;
+                       return NULL;
                }
                if (fprintf(data_file_out, "ready\n") < 0 || fflush(data_file_out) != 0) {
                        log_system_error("cannot write 'ready' prompt to data stream");
-                       return;
+                       return NULL;
                }
        }
 
@@ -768,7 +768,7 @@ int main(int argc, char **argv)
                }
                if (fprintf(stat_file_out, "ready\n") < 0 || fflush(stat_file_out) != 0) {
                        log_system_error("cannot write 'ready' prompt to statistics stream");
-                       return;
+                       return 1;
                }
        }