comparison src/buffer.c @ 100633:5395c014feb8

* buffer.c (init_buffer): Use realloc instead of xrealloc. * gtkutil.c (free_widget_value): Use xfree instead of free.
author Andreas Schwab <schwab@suse.de>
date Mon, 22 Dec 2008 09:48:21 +0000
parents 2ddd196a711d
children 01f68a925d12
comparison
equal deleted inserted replaced
100632:389db2f016a4 100633:5395c014feb8
5341 whose definition is filename syntax dependent. */ 5341 whose definition is filename syntax dependent. */
5342 len = strlen (pwd); 5342 len = strlen (pwd);
5343 if (!(IS_DIRECTORY_SEP (pwd[len - 1]))) 5343 if (!(IS_DIRECTORY_SEP (pwd[len - 1])))
5344 { 5344 {
5345 /* Grow buffer to add directory separator and '\0'. */ 5345 /* Grow buffer to add directory separator and '\0'. */
5346 pwd = (char *) xrealloc (pwd, len + 2); 5346 pwd = (char *) realloc (pwd, len + 2);
5347 if (!pwd)
5348 fatal ("`get_current_dir_name' failed: %s\n", strerror (errno));
5347 pwd[len] = DIRECTORY_SEP; 5349 pwd[len] = DIRECTORY_SEP;
5348 pwd[len + 1] = '\0'; 5350 pwd[len + 1] = '\0';
5349 } 5351 }
5350 5352
5351 current_buffer->directory = make_unibyte_string (pwd, strlen (pwd)); 5353 current_buffer->directory = make_unibyte_string (pwd, strlen (pwd));