| To: | xen-devel@xxxxxxxxxxxxxxxxxxx |
|---|---|
| Subject: | [Xen-devel] e820.c : why char* ? |
| From: | PUCCETTI Armand <armand.puccetti@xxxxxx> |
| Date: | 2006年6月23日 18:09:51 +0200 |
| Delivery-date: | 2006年6月23日 09:10:34 -0700 |
| Envelope-to: | www-data@xxxxxxxxxxxxxxxxxx |
| List-help: | <mailto:xen-devel-request@lists.xensource.com?subject=help> |
| List-id: | Xen developer discussion <xen-devel.lists.xensource.com> |
| List-post: | <mailto:xen-devel@lists.xensource.com> |
| List-subscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
| List-unsubscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
| Sender: | xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
| User-agent: | Thunderbird 1.5.0.2 (X11/20060521) |
In function sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)of file e820.c, the last argument is treated as an integer, but when compiling with gcc
it belongs to [-128,127].Inside the body of that function, however, we use that argument as an int to fill up a table of a different
size, namely: static struct change_member *change_point [256] static struct change_member change_point_list [256]static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
{
...
old_nr = *pnr_map;
...
for (i=0; i < 2*old_nr; i++) {
change_point[i] = &change_point_list[i];
...
}
After the loop, change_point is not completely filled-up, as
change_point [254] and change_point [255]
are never filled nor used. Is it voluntary that pnr_map gets typed and used like this? Armand _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Xen-devel] [RFC] build: use xargs in conjunction with etags , Markus Armbruster |
|---|---|
| Next by Date: | Re: [Xen-devel] FW: Is it a correct place for VBD information? , Mike D. Day |
| Previous by Thread: | [Xen-devel] [RFC] build: use xargs in conjunction with etags , Horms |
| Next by Thread: | [Xen-devel] [PATCH]hvm guest ACPI dynamic initialization , Wang, Winston L |
| Indexes: | [Date] [Thread] [Top] [All Lists] |