Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 6e36158541b1fa2412853023ccccff4b331d31ff 1 parent df78fb1
Dave Reisner authored
Showing with 2 additions and 7 deletions.
  1. +2 −2 burp.c
  2. +0 −5 conf.c
4 burp.c
View
@@ -73,7 +73,7 @@ static int category_is_valid(const char *cat) {
res = bsearch(&key, categories, NUM_CATEGORIES, sizeof(category_t), fn_cmp_cat);
- return(res ? res->num : 0);
+ return(res ? res->num : -1);
}
static int read_config_file(void) {
@@ -347,7 +347,7 @@ int main(int argc, char **argv) {
config->catnum = category_is_valid(config->category);
}
- if (config->catnum == 0) {
+ if (config->catnum < 0) {
usage_categories();
cleanup(ret);
}
5 conf.c
View
@@ -59,11 +59,6 @@ void config_free(config_t *config) {
config_t *config_new(void) {
config_t *config = xcalloc(1, sizeof *config);
- config->user = config->password = config->cookies = config->category = NULL;
- config->persist = FALSE;
- config->verbose = 0;
- config->catnum = 1;
-
return(config);
}
Please sign in to comment.
Something went wrong with that request. Please try again.