[PATCH rtems-tools 7/8] TraceConverter.cc: Fix formatting

Ryan Long ryan.long at oarcorp.com
Fri Dec 3 14:47:58 UTC 2021


---
 tester/covoar/TraceConverter.cc | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/tester/covoar/TraceConverter.cc b/tester/covoar/TraceConverter.cc
index 1a03b49..b5dc20c 100644
--- a/tester/covoar/TraceConverter.cc
+++ b/tester/covoar/TraceConverter.cc
@@ -35,11 +35,10 @@ void usage()
             << progname
             << " [-v] -c CPU -e executable -t tracefile [-E logfile]"
             << std::endl;
-  exit(1);
+  exit( 1 );
 }
 
-static void
-fatal_signal( int signum )
+static void fatal_signal( int signum )
 {
   signal( signum, SIG_DFL );
 
@@ -52,20 +51,23 @@ fatal_signal( int signum )
   kill( getpid(), signum );
 }
 
-static void
-setup_signals( void )
+static void setup_signals()
 {
-  if ( signal (SIGINT, SIG_IGN) != SIG_IGN )
+  if ( signal (SIGINT, SIG_IGN) != SIG_IGN ) {
     signal( SIGINT, fatal_signal );
+  }
 #ifdef SIGHUP
-  if ( signal( SIGHUP, SIG_IGN ) != SIG_IGN )
+  if ( signal( SIGHUP, SIG_IGN ) != SIG_IGN ) {
     signal( SIGHUP, fatal_signal );
+  }
 #endif
-  if ( signal( SIGTERM, SIG_IGN ) != SIG_IGN )
+  if ( signal( SIGTERM, SIG_IGN ) != SIG_IGN ) {
     signal( SIGTERM, fatal_signal );
+  }
 #ifdef SIGPIPE
-  if ( signal( SIGPIPE, SIG_IGN ) != SIG_IGN )
+  if ( signal( SIGPIPE, SIG_IGN ) != SIG_IGN ) {
     signal( SIGPIPE, fatal_signal );
+  }
 #endif
 #ifdef SIGCHLD
   signal( SIGCHLD, SIG_DFL );
@@ -100,15 +102,15 @@ int main(
    //
   progname = argv[0];
 
-  while ((opt = getopt(argc, argv, "c:e:l:L:t:v")) != -1) {
-    switch (opt) {
-      case 'c': cpuname = optarg;        break;
-      case 'e': executable = optarg;     break;
-      case 'l': logname = optarg;        break;
+  while ( (opt = getopt( argc, argv, "c:e:l:L:t:v" ) ) != -1 ) {
+    switch ( opt ) {
+      case 'c': cpuname        = optarg; break;
+      case 'e': executable     = optarg; break;
+      case 'l': logname        = optarg; break;
       case 'L': dynamicLibrary = optarg; break;
-      case 't': tracefile = optarg;      break;
-      case 'v': verbose = true;          break;
-      default:  usage();
+      case 't': tracefile      = optarg; break;
+      case 'v': verbose        = true;   break;
+      default: usage();
     }
   }
 
@@ -146,14 +148,14 @@ int main(
 
   Coverage::ObjdumpProcessor objdumpProcessor( symbolsToAnalyze, targetInfo );
 
-  if ( !dynamicLibrary.empty() )
+  if ( !dynamicLibrary.empty() ) {
     executableInfo = new Coverage::ExecutableInfo(
       executable,
       dynamicLibrary,
       false,
       symbolsToAnalyze
     );
-  else {
+  } else {
     try
     {
       executableInfo = new Coverage::ExecutableInfo(
-- 
1.8.3.1



More information about the devel mailing list