[PATCH] terminal: Convert all *alloc's to x*alloc's.
Kristian Høgsberg
hoegsberg at gmail.com
Tue Apr 29 13:27:41 PDT 2014
On Mon, Apr 28, 2014 at 06:44:08PM +0000, Bryce W. Harrington wrote:
> This ensures the allocation results are checked for NULL (out of
> memory), and terminates the program in such a case.
>
> Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
Applied, thanks.
Kristian
> ---
> clients/terminal.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/clients/terminal.c b/clients/terminal.c
> index 5931ce2..924549e 100644
> --- a/clients/terminal.c
> +++ b/clients/terminal.c
> @@ -772,10 +772,10 @@ terminal_resize_cells(struct terminal *terminal,
> } else {
> terminal->max_width = width;
> data_pitch = width * sizeof(union utf8_char);
> - data = zalloc(data_pitch * terminal->buffer_height);
> + data = xzalloc(data_pitch * terminal->buffer_height);
> attr_pitch = width * sizeof(struct attr);
> - data_attr = malloc(attr_pitch * terminal->buffer_height);
> - tab_ruler = zalloc(width);
> + data_attr = xmalloc(attr_pitch * terminal->buffer_height);
> + tab_ruler = xzalloc(width);
> attr_init(data_attr, terminal->curr_attr,
> width * terminal->buffer_height);
>
> --
> 1.7.9.5
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list