Changeset 623b49f1 in mainline for kernel/arch/ia32xen/src/smp/apic.c


Ignore:
Timestamp:
2007-01-29T19:22:04Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1004b37
Parents:
7d07bf3
Message:

fix signed/unsigned comparison and integer overflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32xen/src/smp/apic.c

    r7d07bf3 r623b49f1  
    125125{
    126126        io_apic_id_t idreg;
    127         int i;
     127        unsigned int i;
    128128
    129129        exc_register(VECTOR_APIC_SPUR, "apic_spurious", (iroutine) apic_spurious);
     
    529529{
    530530        io_redirection_reg_t reg;
    531         int i, pin;
    532        
    533         for (i=0;i<16;i++) {
    534                 if (irqmask & (1<<i)) {
     531        unsigned int i;
     532        int pin;
     533       
     534        for (i = 0; i < 16; i++) {
     535                if (irqmask & (1 << i)) {
    535536                        /*
    536537                         * Mask the signal input in IO APIC if there is a
     
    554555void io_apic_enable_irqs(uint16_t irqmask)
    555556{
    556         int i, pin;
     557        unsigned int i;
     558        int pin;
    557559        io_redirection_reg_t reg;       
    558560       
    559         for (i=0;i<16;i++) {
    560                 if (irqmask & (1<<i)) {
     561        for (i = 0; i < 16; i++) {
     562                if (irqmask & (1 << i)) {
    561563                        /*
    562564                         * Unmask the signal input in IO APIC if there is a
Note: See TracChangeset for help on using the changeset viewer.