In function  :
 
Elf64_Shdr*
xc_core_shdr_get(struct
xc_core_section_headers *sheaders) {
    Elf64_Shdr *shdr;
 
    if ( sheaders->num ==
sheaders->num_max )
    {
        Elf64_Shdr *shdrs;
        if ( sheaders->num_max +
SHDR_INC < sheaders->num_max )  <--- in this point 
 
 
// I think at this point ,sheaders->num_max
+ SHDR_INC always is major or equal than sheaders->num_max  
 
// I think : x + y > x     
 
My consideration was only for resolving error
compiling because I not have time to learn what libxc are and what I can use
function
 
J
 
 
 
       {
            errno = E2BIG;
            return NULL;
        }
 
        sheaders->num_max +=
SHDR_INC;
        shdrs =
realloc(sheaders->shdrs,
                       
sizeof(sheaders->shdrs[0]) * sheaders->num_max);
 
 
        if ( shdrs == NULL ) <<--
word wrap ??
            return NULL;
        sheaders->shdrs = shdrs;
 
 
i think this are correct: 
 
       if ( shdrs == NULL )
return NULL; 
 
        sheaders->shdrs = shdrs;
 
 
or:
 
 
if ( shdrs ==
NULL ) {return NULL};
        sheaders->shdrs = shdrs;
 
    }
 
    shdr =
&sheaders->shdrs[sheaders->num];
    sheaders->num++;
    memset(shdr, 0, sizeof(*shdr));
    return shdr;
}
 
 
Always happy c++
 
Ps.
C++ are always better than other J 
 
----------------------------------------------------------------------------------------------------------------
 
Maniciati
Enrico
Consulenza,progettazione,
realizzazione
e assistenza
reti
e sistemi informatici
 
email:
enrico.maniciati@xxxxxxxxxxx
Skype:
erikm.project
Msn:
enrico.maniciati@xxxxxxxxxx
----------------------------------------------------------------------------------------------------------------
Il presente messaggio di posta elettronica e l’eventuale allegato
contengono informazioni di carattere confidenziale rivolte esclusivamente al
destinatario sopra indicato. E’ vietato l’uso, la diffusione,
distribuzione o riproduzione da parte di ogni altro soggetto. Nel caso aveste
ricevuto questo messaggio per errore, siete pregati di segnalarlo
immediatamente al mittente e distruggere quanto ricevuto senza farne copia. I
dati personali sono trattati da Maniciati Enrico via L.Ariosto,13 30039 Strà
(VE) in conformità al DL.vo 196/2003
----------------------------------------------------------------------------------------------------------------