mirror of
https://github.com/labwc/labwc.git
synced 2026-02-18 22:05:32 -05:00
common/string-helpers.c: add strdup_printf()
This commit is contained in:
parent
41de529fff
commit
f4f35a9dff
4 changed files with 47 additions and 23 deletions
|
|
@ -1096,11 +1096,9 @@ post_processing(void)
|
|||
int nr_workspaces = wl_list_length(&rc.workspace_config.workspaces);
|
||||
if (nr_workspaces < rc.workspace_config.min_nr_workspaces) {
|
||||
struct workspace *workspace;
|
||||
char workspace_name[32];
|
||||
for (int i = nr_workspaces; i < rc.workspace_config.min_nr_workspaces; i++) {
|
||||
workspace = znew(*workspace);
|
||||
snprintf(workspace_name, sizeof(workspace_name), "Workspace %d", i + 1);
|
||||
workspace->name = xstrdup(workspace_name);
|
||||
workspace->name = strdup_printf("Workspace %d", i + 1);
|
||||
wl_list_append(&rc.workspace_config.workspaces, &workspace->link);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue