grub2/0206-grub-core-loader-i386-pc-plan9.c-fill_disk-Fix-types.patch
Peter Jones f74b50e380 Rebase to upstream, fix a pile of bugs. The usual.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-12 15:37:08 -04:00

52 lines
1.6 KiB
Diff

From b21d161bc61fc8b411f21df0f25598090a5b66cc Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Sun, 10 Mar 2013 19:27:50 +0100
Subject: [PATCH 206/482] * grub-core/loader/i386/pc/plan9.c
(fill_disk): Fix types to use intended shifts rather than division.
---
ChangeLog | 5 +++++
grub-core/loader/i386/pc/plan9.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8814c22..334f81d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-03-10 Vladimir Serbinenko <phcoder@gmail.com>
+ * grub-core/loader/i386/pc/plan9.c (fill_disk): Fix types to use
+ intended shifts rather than division.
+
+2013-03-10 Vladimir Serbinenko <phcoder@gmail.com>
+
* include/grub/datetime.h (grub_datetime2unixtime): Fix unixtime
computation for some years before epoch. Avode confusing division
while on it.
diff --git a/grub-core/loader/i386/pc/plan9.c b/grub-core/loader/i386/pc/plan9.c
index 7dc12a8..1c7b381 100644
--- a/grub-core/loader/i386/pc/plan9.c
+++ b/grub-core/loader/i386/pc/plan9.c
@@ -292,7 +292,7 @@ fill_disk (const char *name, void *data)
case GRUB_DISK_DEVICE_ATA_ID:
{
- int unit;
+ unsigned unit;
if (grub_strlen (dev->disk->name) < sizeof ("ata0") - 1)
unit = 0;
else
@@ -304,7 +304,7 @@ fill_disk (const char *name, void *data)
if (((dev->disk->id >> GRUB_SCSI_ID_SUBSYSTEM_SHIFT) & 0xff)
== GRUB_SCSI_SUBSYSTEM_PATA)
{
- int unit;
+ unsigned unit;
if (grub_strlen (dev->disk->name) < sizeof ("ata0") - 1)
unit = 0;
else
--
1.8.2.1