]> Dogcows Code - chaz/tar/commitdiff
(diff_init): Don't use valloc; on older or buggy hosts, you can't
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2004 04:44:13 +0000 (04:44 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 3 Aug 2004 04:44:13 +0000 (04:44 +0000)
free the result.  Use page_aligned_alloc instead.

src/compare.c

index ba120be1a25278cd5c65c576c11a17845e7cd7ce..ebcb8c2ba4042cab9f596317e81ee8df65ee598c 100644 (file)
@@ -54,9 +54,8 @@ static char *diff_buffer;
 void
 diff_init (void)
 {
-  diff_buffer = valloc (record_size);
-  if (!diff_buffer)
-    xalloc_die ();
+  void *ptr;
+  diff_buffer = page_aligned_alloc (&ptr, record_size);
 }
 
 /* Sigh about something that differs by writing a MESSAGE to stdlis,
This page took 0.023309 seconds and 4 git commands to generate.