Hi!
9-Янв-2005 11:25 [EMAIL PROTECTED] (Kenneth Davis) wrote to
[EMAIL PROTECTED]:
> fix bug 1789 and add some extra debug prints
> +++ initdisk.c 9 Jan 2005 11:25:44 -0000 1.33.2.2
> if (pEntry->NumSect > 0xffff)
> + {
> + pddt->ddt_defbpb.bpb_nsize = 0;
> pddt->ddt_defbpb.bpb_huge = pEntry->NumSect;
> + }
> else
> + {
> pddt->ddt_defbpb.bpb_nsize = (UWORD) (pEntry->NumSect);
> + pddt->ddt_defbpb.bpb_huge = 0;
> + }
Small optimization :) and readability change:
pddt->ddt_defbpb.bpb_nsize = 0;
pddt->ddt_defbpb.bpb_huge = pEntry->NumSect;
if (hiword (pEntry->NumSect) == 0)
{
pddt->ddt_defbpb.bpb_nsize = loword (pEntry->NumSect);
pddt->ddt_defbpb.bpb_huge = 0;
}
Last assignment (bpb_huge = 0) also may be optimized (because hiword is
already zero), but this (3-5 bytes reducing) hurts readability.
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel