I assume you are pointing out the use of hiword & loword versus what I used

I did this for two reasons, the 1st is that those macros are not in the
stable kernel's portab.h, so using them would just make a kernel that did not
compile.  Yes I could easily add them, but that wasn't the point of the commits,
they were to fix specific issues whose changes I am reasonably sure have no 
negative
side effects.  (Please note, my dev kernel is somewhat different from the
one in cvs as I have switched it to remove all fnodes, but haven't yet worked 
out
enough kinks that I'm willing to commit it, so I'm not inclined to merge more
from it than necessary at the moment.)

Testing directly against 0xFFFF as a boundary condition is clearer and more 
succinct
(to me) than testing if (0xFFFF & (unsigned)((pEntry->NumSect) >> 16u)) equals 
0,
hence my selection of it over the use of hiword.  The use of loword is 
technically
safer and more accurate, but again the macro isn't available in stable yet, and 
unless
someone changes UWORD to be smaller or signed, in which case, this is the least 
of
their issues, the resulting value should still be the same (based on the if) .

Please explain why you feel hiword is better and I will reconsider.
(and please do, if you have a reason other than style or if the general
 consensus is that using hiword is clearer, then I will make the change)

Thank you for reviewing the changes,
Jeremy


---------- Original Message -------------
Subject: [Freedos-kernel] Re: [Freedos-cvs] kernel/kernel initdisk.c,1.34,135
Date: Mon,  7 Mar 2005 01:12:40 +0300 (MSK)
From: "Arkady V.Belousov" <[EMAIL PROTECTED]>
To: freedos-devel@lists.sourceforge.net,
        freedos-kernel@lists.sourceforge.net


Салям!

6-Мар-2005 16:12 [EMAIL PROTECTED] (Kenneth Davis) wrote to
[EMAIL PROTECTED]:

> insure bpb_huge is initialized (zeroed) [merge from dev kernel]
> +++ initdisk.c        6 Mar 2005 16:12:34 -0000       1.35
> @@ -603,12 +603,15 @@
> +  if (pEntry->NumSect <= 0xffff)
> +  {
>      pddt->ddt_defbpb.bpb_nsize = (UWORD) (pEntry->NumSect);

  if (hiword (pEntry->NumSect) == 0)
  {
    pddt->ddt_defbpb.bpb_nsize = loword (pEntry->NumSect);




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Freedos-kernel mailing list
Freedos-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to