Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

dont explicitly zero out config struct. calloc does this for us

  • Loading branch information...
commit 6e36158541b1fa2412853023ccccff4b331d31ff 1 parent df78fb1
Dave Reisner authored

Showing 2 changed files with 2 additions and 7 deletions. Show diff stats Hide diff stats

  1. +2 2 burp.c
  2. +0 5 conf.c
4 burp.c
@@ -73,7 +73,7 @@ static int category_is_valid(const char *cat) {
73 73
74 74 res = bsearch(&key, categories, NUM_CATEGORIES, sizeof(category_t), fn_cmp_cat);
75 75
76   - return(res ? res->num : 0);
  76 + return(res ? res->num : -1);
77 77 }
78 78
79 79 static int read_config_file(void) {
@@ -347,7 +347,7 @@ int main(int argc, char **argv) {
347 347 config->catnum = category_is_valid(config->category);
348 348 }
349 349
350   - if (config->catnum == 0) {
  350 + if (config->catnum < 0) {
351 351 usage_categories();
352 352 cleanup(ret);
353 353 }
5 conf.c
@@ -59,11 +59,6 @@ void config_free(config_t *config) {
59 59 config_t *config_new(void) {
60 60 config_t *config = xcalloc(1, sizeof *config);
61 61
62   - config->user = config->password = config->cookies = config->category = NULL;
63   - config->persist = FALSE;
64   - config->verbose = 0;
65   - config->catnum = 1;
66   -
67 62 return(config);
68 63 }
69 64

0 comments on commit 6e36158

Please sign in to comment.
Something went wrong with that request. Please try again.