summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/checkwps/checkwps.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/checkwps/checkwps.c b/tools/checkwps/checkwps.c
index 846dd97191..ec0262bfe7 100644
--- a/tools/checkwps/checkwps.c
+++ b/tools/checkwps/checkwps.c
@@ -37,6 +37,7 @@
37 37
38bool debug_wps = true; 38bool debug_wps = true;
39int wps_verbose_level = 0; 39int wps_verbose_level = 0;
40char *skin_buffer;
40 41
41int errno; 42int errno;
42 43
@@ -252,8 +253,6 @@ int main(int argc, char **argv)
252 struct wps_data wps={0}; 253 struct wps_data wps={0};
253 enum screen_type screen = SCREEN_MAIN; 254 enum screen_type screen = SCREEN_MAIN;
254 struct screen* wps_screen; 255 struct screen* wps_screen;
255
256 char* buffer = NULL;
257 256
258 /* No arguments -> print the help text 257 /* No arguments -> print the help text
259 * Also print the help text upon -h or --help */ 258 * Also print the help text upon -h or --help */
@@ -278,14 +277,14 @@ int main(int argc, char **argv)
278 wps_verbose_level++; 277 wps_verbose_level++;
279 } 278 }
280 } 279 }
281 buffer = malloc(SKIN_BUFFER_SIZE); 280 skin_buffer = malloc(SKIN_BUFFER_SIZE);
282 if (!buffer) 281 if (!skin_buffer)
283 { 282 {
284 printf("mallloc fail!\n"); 283 printf("mallloc fail!\n");
285 return 1; 284 return 1;
286 } 285 }
287 286
288 skin_buffer_init(buffer, SKIN_BUFFER_SIZE); 287 skin_buffer_init(skin_buffer, SKIN_BUFFER_SIZE);
289 288
290 /* Go through every skin that was thrown at us, error out at the first 289 /* Go through every skin that was thrown at us, error out at the first
291 * flawed wps */ 290 * flawed wps */
@@ -311,7 +310,7 @@ int main(int argc, char **argv)
311 310
312 printf("WPS parsed OK\n\n"); 311 printf("WPS parsed OK\n\n");
313 if (wps_verbose_level>2) 312 if (wps_verbose_level>2)
314 skin_debug_tree(wps.tree); 313 skin_debug_tree(SKINOFFSETTOPTR(skin_buffer, wps.tree));
315 filearg++; 314 filearg++;
316 } 315 }
317 return 0; 316 return 0;