libpfm/libpfm-3.2-showreginfo.patch
William Eden Cohen 9acc57cbda - Make sure that CFLAGS in pfmlib/lib/ is used.
- Separate build and install processes.
- Clean up the descriptions.
2006-06-27 13:53:41 +00:00

21 lines
519 B
Diff

--- libpfm-3.2-060621/examples/showreginfo.c.fread 2006-06-26 23:21:03.000000000 -0400
+++ libpfm-3.2-060621/examples/showreginfo.c 2006-06-26 23:21:35.000000000 -0400
@@ -65,7 +65,7 @@
unsigned int num_pmds;
char *lname, *p, *s, *buffer, *ptr;
unsigned long long def, reset;
- size_t pgsz;
+ size_t pgsz, elements;
num_pmcs = num_pmds = 0;
@@ -81,7 +81,7 @@
/*
* sysfs file cannot exceed the size of a page.
*/
- fread(buffer, pgsz, 1, fp);
+ elements=fread(buffer, pgsz, 1, fp);
fclose(fp);