From 12b2b8543a5e590f27ad185ad367ffc2ccea3b48 Mon Sep 17 00:00:00 2001 From: Stéphane Marchesin Date: Thu, 10 Jan 2013 20:44:53 -0800 Subject: Small fixes. --- epilogue.c | 6 +++--- gen.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/epilogue.c b/epilogue.c index 9b3f51f..5de3c0e 100644 --- a/epilogue.c +++ b/epilogue.c @@ -168,7 +168,7 @@ static void exit_func() findex[i] = i; } - qsort(findex, num_funcs, sizeof(int), compare); + qsort(findex, num_funcs, sizeof(int), compare); printf("=============================================================\n"); printf("Function Name \t\t\ttotal(us) \ttotal(%%) \t #calls\t avg us\n"); @@ -262,8 +262,8 @@ int __libc_start_main(int(*main_fct)(int, char **), int argc, /* get the host getprocaddress function */ lib_glXGetProcAddressARB = dlsym(lib_handle_libGL, "glXGetProcAddressARB"); - memset(total_time, sizeof(total_time), 0); - memset(total_time, sizeof(total_calls), 0); + memset(total_time, 0, sizeof(total_time)); + memset(total_time, 0, sizeof(total_calls)); functable_init(); diff --git a/gen.c b/gen.c index fe840d6..e31d8ce 100644 --- a/gen.c +++ b/gen.c @@ -262,13 +262,13 @@ int main() cur = cur->xmlChildrenNode; cur = cur->next; - while (cur != NULL) + while (cur != NULL) { retourcategory = cur; if( (!xmlStrcmp(cur->name, (const xmlChar *)"category")) ) { cur = cur->xmlChildrenNode; - cur = cur->next; + cur = cur->next; while (cur != NULL) { @@ -283,7 +283,7 @@ int main() } } - else if (!xmlStrcmp(cur->name, (const xmlChar *)"function")) + else if (!xmlStrcmp(cur->name, (const xmlChar *)"function")) { cur = cur->xmlChildrenNode; if(cur->next!=NULL) @@ -294,7 +294,7 @@ int main() if(cur->next->next==NULL) break; cur = cur->next->next; - } + } // function return value if(!xmlStrcmp(cur->name, (const xmlChar *)"return")) @@ -316,10 +316,10 @@ int main() cur = cur->xmlChildrenNode; if(cur->next!=NULL) - cur = cur->next; + cur = cur->next; attrib = xmlGetProp(cur, "name"); - np=-1; + np=-1; if(!xmlStrcmp(cur->name, (const xmlChar *)"return")) @@ -432,7 +432,7 @@ int main() { if (strcmp(nameparam[i],"UNUSED")==0) continue; - + fprintf(file_wrapped,"\t\tprintf(\"%s \",%s %s);\n",type_print(type[i]),type_cast(type[i]),nameparam[i]); } fprintf(file_wrapped, "\t\tprintf(\"\\n\");\n"); @@ -449,13 +449,13 @@ int main() { if (strcmp(nameparam[i],"UNUSED")==0) continue; - + fprintf(file_wrapped,"%s,",type[i]); } if(np==-1) fprintf(file_wrapped,"void"); else fseek(file_wrapped,-1,SEEK_CUR); - fprintf(file_wrapped,"))functable[%d])(",fnum); + fprintf(file_wrapped,"))functable[%d])(",fnum); for(i=0;i<=np;i++) { if (strcmp(nameparam[i],"UNUSED")==0) -- cgit v1.2.3