[strutils] no declaration after statement
authorPaul Brossier <piem@piem.org>
Sat, 22 Dec 2018 23:01:43 +0000 (00:01 +0100)
committerPaul Brossier <piem@piem.org>
Sat, 22 Dec 2018 23:01:43 +0000 (00:01 +0100)
src/utils/strutils.c

index 4f61b64..f00f403 100644 (file)
 
 const char_t *aubio_str_get_extension(const char_t *filename)
 {
-  if (!filename) return NULL;
   // find last occurence of dot character
-  const char_t *ext = strrchr(filename, '.');
+  const char_t *ext;
+  if (!filename) return NULL;
+  ext = strrchr(filename, '.');
   if (!ext || ext == filename) return "";
   else return ext + 1;
 }