libpfm/libpfm-3.2-showreginfo.patch

21 lines
519 B
Diff
Raw Normal View History

--- 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);