~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to xkb/xkbLEDs.c

Tags: 2:1.10.1-2
* Build xserver-xorg-core-udeb on hurd-i386.  Thanks, Samuel Thibault!
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
556
556
    else if ((kf!=NULL)&&((kf->xkb_sli->flags&XkbSLI_IsDefault)!=0)) {
557
557
        XkbDescPtr      xkb;
558
558
        xkb= dev->key->xkbInfo->desc;
 
559
        sli= kf->xkb_sli;
559
560
        sli->physIndicators=    xkb->indicators->phys_indicators;
560
561
        if (xkb->names->indicators!=sli->names) {
561
562
            checkNames= TRUE;
584
585
        sli->maps=              NULL;
585
586
        sli->names=             NULL;
586
587
    }
 
588
    else
 
589
        return NULL;
587
590
    if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
588
591
        sli->names= calloc(XkbNumIndicators, sizeof(Atom));
589
592
    if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
714
717
            }   
715
718
        }
716
719
    }
717
 
    if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
718
 
        sli->names= calloc(XkbNumIndicators, sizeof(Atom));
719
 
    if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
720
 
        sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
 
720
    if (sli) {
 
721
        if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask))
 
722
            sli->names= calloc(XkbNumIndicators, sizeof(Atom));
 
723
        if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask))
 
724
            sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec));
 
725
    }
721
726
    return sli;
722
727
}
723
728