mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 23:59:22 +00:00
* 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:
1 parent
fd7dd66dbd
commit
f82d79c984
3 files changed
+30
-24
No files matched your search
@@ -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 */
|
||||
Reference in new issue
Block a user