Fix missing return values
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Thu, 13 Dec 2018 11:46:37 +0000 (14:46 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Thu, 13 Dec 2018 11:46:37 +0000 (14:46 +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;
                }
        }