Removed scopes.
authorArmin Novak <armin.novak@thincast.com>
Mon, 30 Mar 2015 09:06:56 +0000 (11:06 +0200)
committerBernhard Miklautz <bernhard.miklautz@thincast.com>
Tue, 31 Mar 2015 13:18:46 +0000 (15:18 +0200)
winpr/libwinpr/utils/wlog/wlog.c

index 7115ea1..a2bd536 100644 (file)
@@ -381,39 +381,36 @@ int WLog_ParseFilters()
        if (!env)
                return -1;
 
+       nSize = GetEnvironmentVariableA("WLOG_FILTER", env, nSize);
+       count = 1;
+       p = env;
+
+       while ((p = strchr(p, ',')) != NULL)
        {
-               nSize = GetEnvironmentVariableA("WLOG_FILTER", env, nSize);
-               count = 1;
-               p = env;
+               count++;
+               p++;
+       }
 
-               while ((p = strchr(p, ',')) != NULL)
-               {
-                       count++;
-                       p++;
-               }
+       g_FilterCount = count;
+       p = env;
 
-               g_FilterCount = count;
-               p = env;
-       }
-       {
-               count = 0;
-               strs = (LPCSTR*) calloc(g_FilterCount, sizeof(LPCSTR));
+       count = 0;
+       strs = (LPCSTR*) calloc(g_FilterCount, sizeof(LPCSTR));
 
-               if (!strs)
-               {
-                       free(env);
-                       return -1;
-               }
+       if (!strs)
+       {
+               free(env);
+               return -1;
+       }
 
-               strs[count++] = p;
+       strs[count++] = p;
 
-               while ((p = strchr(p, ',')) != NULL)
-               {
-                       if (count < g_FilterCount)
-                               strs[count++] = p + 1;
-                       *p = '\0';
-                       p++;
-               }
+       while ((p = strchr(p, ',')) != NULL)
+       {
+               if (count < g_FilterCount)
+                       strs[count++] = p + 1;
+               *p = '\0';
+               p++;
        }
 
        g_Filters = calloc(g_FilterCount, sizeof(wLogFilter));