diff --git a/CARET_trace/src/ros_trace_points.cpp b/CARET_trace/src/ros_trace_points.cpp index fe3a8c6e..25cb41c5 100644 --- a/CARET_trace/src/ros_trace_points.cpp +++ b/CARET_trace/src/ros_trace_points.cpp @@ -53,20 +53,21 @@ thread_local bool trace_filter_is_rcl_publish_recorded; bool exclusion_event = false; -bool filter_launch_node() { +bool filter_launch_node() +{ pid_t pid = getpid(); - FILE *fp; + FILE * fp; char cmd_str[1024]; char result_str[1024]; - sprintf( cmd_str, "ps -ax |grep \"ros2 launch\" | grep %d", pid); - fp = popen( cmd_str, "r" ); - if ( fgets( result_str, sizeof(result_str), fp ) == NULL ) { + sprintf(cmd_str, "ps -ax |grep \"ros2 launch\" | grep %d", pid); + fp = popen(cmd_str, "r"); + if (fgets(result_str, sizeof(result_str), fp) == NULL) { pclose(fp); return false; } pclose(fp); - if ( strstr(result_str, "grep") == NULL ) { + if (strstr(result_str, "grep") == NULL) { return true; } return false;