From 8fe522da2c84630f38c1c52ff85b208e5b0addf8 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 23 Dec 2018 00:01:43 +0100 Subject: [PATCH] [strutils] no declaration after statement --- src/utils/strutils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/strutils.c b/src/utils/strutils.c index 4f61b647..f00f4035 100644 --- a/src/utils/strutils.c +++ b/src/utils/strutils.c @@ -22,9 +22,10 @@ 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; } -- 2.11.0