* include/grub/mm.h (grub_extend_alloc): Remove.
* grub-core/loader/i386/pc/plan9.c: Use own version of grub_extend_alloc with appropriate types.
This commit is contained in:
parent
fd7dd66dbd
commit
f82d79c984
3 changed files with 30 additions and 24 deletions
|
@ -72,21 +72,4 @@ void *EXPORT_FUNC(grub_debug_memalign) (const char *file, int line,
|
|||
grub_size_t align, grub_size_t size);
|
||||
#endif /* MM_DEBUG && ! GRUB_UTIL */
|
||||
|
||||
#include <grub/err.h>
|
||||
|
||||
static inline grub_err_t
|
||||
grub_extend_alloc (grub_size_t sz, grub_size_t *allocated, void **ptr)
|
||||
{
|
||||
void *n;
|
||||
if (sz < *allocated)
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
*allocated = 2 * sz;
|
||||
n = grub_realloc (*ptr, *allocated);
|
||||
if (!n)
|
||||
return grub_errno;
|
||||
*ptr = n;
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
#endif /* ! GRUB_MM_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue