shithub: sox

Download patch

ref: 0a78237d31ddb0825b0d6048b8d8fd0c9f2aa854
parent: 94bca881fc000cf66a48ade290984ce45cbae5b2
author: rrt <rrt>
date: Wed Dec 6 15:49:32 EST 2006

Cosmetic tidying of code I was reading through.

--- a/src/util.c
+++ b/src/util.c
@@ -38,26 +38,18 @@
   char const * dot_pos;
  
   drivername = strrchr(message->filename, '/');
-  if (drivername != NULL)
-  {
+  if (drivername != NULL) {
     ++drivername;
-  }
-  else
-  {
+  } else {
     drivername = strrchr(message->filename, '\\');
     if (drivername != NULL)
-    {
       ++drivername;
-    }
     else
-    {
       drivername = message->filename;
-    }
   }
 
   dot_pos = strrchr(drivername, '.');
-  if (dot_pos != NULL && dot_pos - drivername <= sizeof(buffer) - 1)
-  {
+  if (dot_pos != NULL && dot_pos - drivername <= sizeof(buffer) - 1) {
     strncpy(buffer, drivername, dot_pos - drivername);
     buffer[dot_pos - drivername] = '\0';
     drivername = buffer;