diff options
author | rcyeske <rcyeske> | 2001-03-02 06:06:23 +0000 |
---|---|---|
committer | rcyeske <rcyeske> | 2001-03-02 06:06:23 +0000 |
commit | 46d33884f2f1061ae1a77c26928f97d573e57c6c (patch) | |
tree | 39c8a9fe54a29d761a797cc9124f945ded2ecc3c /src/manage.c | |
parent | 58e95be4eab6d82257214d76414c9eef901c5915 (diff) | |
download | ratpoison-46d33884f2f1061ae1a77c26928f97d573e57c6c.zip |
* ratpoison.h (xmalloc, xrealloc, fatal): Prototype.
* main.c (xmalloc): Move here from sbuf.c.
(xrealloc): Likewise.
(fatal): Likewise.
* number.c (find_empty_cell): Use xrealloc, remove error check.
(init_numbers): Likewise.
* manage.c (get_window_name): Likewise.
* main.c (main): Likewise.
* list.c (add_to_window_list): Likewise.
(add_to_window_list): Likewise.
* events.c (handle_key): Likewise.
* input.c (keysym_to_string): Likewise.
(get_more_input): Use xrealloc, remove error check.
* main.c (read_rc_file): Take a file pointer rather than a
filename.
(read_startup_files): If ~/.ratpoisonrc is not readable try
/etc/ratpoisonrc.
Diffstat (limited to 'src/manage.c')
-rw-r--r-- | src/manage.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/manage.c b/src/manage.c index 0eb0e28..38d9c93 100644 --- a/src/manage.c +++ b/src/manage.c @@ -107,11 +107,8 @@ get_window_name (Window w) if (list_len > 0) { - if ((name = malloc (strlen (name_list[0]) + 1)) == NULL) - { - PRINT_ERROR ("Out of memory!\n"); - exit (EXIT_FAILURE); - } + name = xmalloc (strlen (name_list[0]) + 1); + strcpy (name, name_list[0]); /* Its our responsibility to free this. */ |