diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-01-03 22:47:38 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-01-03 23:06:38 +0100 |
commit | c2aa1264fc52f6df08868986ed81b2d199059f7c (patch) | |
tree | 1953bde1078a0821684e51ad467be251c8696e0e | |
parent | 993dde6cfa315ceaa29dfd521f9fddb27a80e66a (diff) | |
download | ratpoison-c2aa1264fc52f6df08868986ed81b2d199059f7c.zip |
malloc -> xmalloc
-rw-r--r-- | src/actions.c | 4 | ||||
-rw-r--r-- | src/globals.c | 2 | ||||
-rw-r--r-- | src/group.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/actions.c b/src/actions.c index 708da6f..7cbdba4 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2301,7 +2301,7 @@ parse_args (char *str, struct list_head *list, int nargs, int raw) if (str == NULL) return NULL; - tmp = malloc (strlen(str) + 1); + tmp = xmalloc (strlen(str) + 1); for (i=str; *i; i++) { @@ -2663,7 +2663,7 @@ spawn(char *cmd, int raw, rp_frame *frame) PRINT_DEBUG (("spawned %s\n", cmd)); /* Add this child process to our list. */ - child = malloc (sizeof (rp_child_info)); + child = xmalloc (sizeof (rp_child_info)); child->cmd = strdup (cmd); child->pid = pid; child->terminated = 0; diff --git a/src/globals.c b/src/globals.c index f81d7ad..7faff71 100644 --- a/src/globals.c +++ b/src/globals.c @@ -111,7 +111,7 @@ set_nselection (char *txt, int len) free (selection.text); /* Copy the string by hand. */ - selection.text = malloc(len+1); + selection.text = xmalloc (len + 1); selection.len = len + 1; for (i=0; i<len; i++) selection.text[i] = txt[i]; diff --git a/src/group.c b/src/group.c index 348ffcc..53e509e 100644 --- a/src/group.c +++ b/src/group.c @@ -377,7 +377,7 @@ group_add_window (rp_group *g, rp_window *w) rp_window_elem *we; /* Create our container structure for the window. */ - we = malloc (sizeof (rp_window_elem)); + we = xmalloc (sizeof (rp_window_elem)); we->win = w; we->number = -1; |