]> Nishi Git Mirror - gwion.git/commitdiff
:art: Reduce variable scope
authorfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 22 Feb 2019 15:24:35 +0000 (16:24 +0100)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 22 Feb 2019 15:24:35 +0000 (16:24 +0100)
src/plug.c

index 4729fa36491158101f0b81f48d86fb358e2a1be2..2593bd8c2433a5d14b627eab8747537614157714 100644 (file)
@@ -81,8 +81,8 @@ ANN static Vector get_arg(const m_str name, const Vector v) {
   const size_t len = strlen(name);
   for(m_uint i = vector_size(v) + 1; --i;) {
     const m_str str = (m_str)vector_at(v, i - 1);
-    const m_str arg = strchr(str, '=');
     if(!strncmp(name, str, len)) {
+      const m_str arg = strchr(str, '=');
       m_str c, d = strdup(arg+1);
       c = d;
       const Vector args = new_vector();