mirror of
https://github.com/tmux/tmux.git
synced 2026-08-03 22:18:36 +00:00
Make if clearer.
This commit is contained in:
@@ -850,8 +850,11 @@ layout_prepare(struct window *w, const char *layout, char **cause)
|
||||
ctx.cells = 0;
|
||||
has_checksum = layout_parse_checksum(&ctx, &csum);
|
||||
body = ctx.ptr;
|
||||
if ((has_checksum && csum != layout_checksum(body, ctx.end)) ||
|
||||
layout_construct(&ctx, NULL, &root) != 0) {
|
||||
if (has_checksum && csum != layout_checksum(body, ctx.end)) {
|
||||
*cause = xstrdup("invalid layout checksum");
|
||||
return (NULL);
|
||||
}
|
||||
if (layout_construct(&ctx, NULL, &root) != 0) {
|
||||
*cause = xstrdup("invalid layout");
|
||||
layout_free_cell(root);
|
||||
return (NULL);
|
||||
|
||||
Reference in New Issue
Block a user