mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
bufio: Use grub_size_t instead of plain int for size
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
This commit is contained in:
1 parent
72e80c0255
commit
f3f8347569
2 files changed
+5
-5
No files matched your search
@@ -43,7 +43,7 @@ typedef struct grub_bufio *grub_bufio_t;
|
||||
static struct grub_fs grub_bufio_fs;
|
||||
|
||||
grub_file_t
|
||||
grub_bufio_open (grub_file_t io, int size)
|
||||
grub_bufio_open (grub_file_t io, grub_size_t size)
|
||||
{
|
||||
grub_file_t file;
|
||||
grub_bufio_t bufio = 0;
|
||||
@@ -57,7 +57,7 @@ grub_bufio_open (grub_file_t io, int size)
|
||||
else if (size > GRUB_BUFIO_MAX_SIZE)
|
||||
size = GRUB_BUFIO_MAX_SIZE;
|
||||
|
||||
if ((size < 0) || ((unsigned) size > io->size))
|
||||
if (size > io->size)
|
||||
size = ((io->size > GRUB_BUFIO_MAX_SIZE) ? GRUB_BUFIO_MAX_SIZE :
|
||||
io->size);
|
||||
|
||||
@@ -88,7 +88,7 @@ grub_bufio_open (grub_file_t io, int size)
|
||||
}
|
||||
|
||||
grub_file_t
|
||||
grub_buffile_open (const char *name, int size)
|
||||
grub_buffile_open (const char *name, grub_size_t size)
|
||||
{
|
||||
grub_file_t io, file;
|
||||
|
||||
|
||||
Reference in new issue
Block a user