libi3: change scalloc() signature to match calloc()

This commit is contained in:
shdown
2015-08-03 12:50:13 +03:00
parent 05fb909636
commit bc52fae15c
32 changed files with 80 additions and 81 deletions

View File

@ -242,7 +242,7 @@ CFGFUN(for_window, const char *command) {
return;
}
DLOG("\t should execute command %s for the criteria mentioned above\n", command);
Assignment *assignment = scalloc(sizeof(Assignment));
Assignment *assignment = scalloc(1, sizeof(Assignment));
assignment->type = A_COMMAND;
match_copy(&(assignment->match), current_match);
assignment->dest.command = sstrdup(command);
@ -400,7 +400,7 @@ CFGFUN(workspace, const char *workspace, const char *output) {
}
}
if (!duplicate) {
assignment = scalloc(sizeof(struct Workspace_Assignment));
assignment = scalloc(1, sizeof(struct Workspace_Assignment));
assignment->name = sstrdup(workspace);
assignment->output = sstrdup(output);
TAILQ_INSERT_TAIL(&ws_assignments, assignment, ws_assignments);
@ -458,7 +458,7 @@ CFGFUN(assign, const char *workspace) {
return;
}
DLOG("New assignment, using above criteria, to workspace \"%s\".\n", workspace);
Assignment *assignment = scalloc(sizeof(Assignment));
Assignment *assignment = scalloc(1, sizeof(Assignment));
match_copy(&(assignment->match), current_match);
assignment->type = A_TO_WORKSPACE;
assignment->dest.workspace = sstrdup(workspace);
@ -472,7 +472,7 @@ CFGFUN(no_focus) {
}
DLOG("New assignment, using above criteria, to ignore focus on manage.\n");
Assignment *assignment = scalloc(sizeof(Assignment));
Assignment *assignment = scalloc(1, sizeof(Assignment));
match_copy(&(assignment->match), current_match);
assignment->type = A_NO_FOCUS;
TAILQ_INSERT_TAIL(&assignments, assignment, assignments);
@ -555,7 +555,7 @@ static void bar_configure_binding(const char *button, const char *command) {
}
}
struct Barbinding *new_binding = scalloc(sizeof(struct Barbinding));
struct Barbinding *new_binding = scalloc(1, sizeof(struct Barbinding));
new_binding->input_code = input_code;
new_binding->command = sstrdup(command);
TAILQ_INSERT_TAIL(&(current_bar.bar_bindings), new_binding, bindings);
@ -669,7 +669,7 @@ CFGFUN(bar_finish) {
/* Copy the current (static) structure into a dynamically allocated
* one, then cleanup our static one. */
Barconfig *bar_config = scalloc(sizeof(Barconfig));
Barconfig *bar_config = scalloc(1, sizeof(Barconfig));
memcpy(bar_config, &current_bar, sizeof(Barconfig));
TAILQ_INSERT_TAIL(&barconfigs, bar_config, configs);