Fix clearing all stats function (#8172)

Co-authored-by: Damian Meden <damian.meden@verizonmedia.com>
diff --git a/lib/records/P_RecCore.cc b/lib/records/P_RecCore.cc
index b05af9f..717011d 100644
--- a/lib/records/P_RecCore.cc
+++ b/lib/records/P_RecCore.cc
@@ -746,7 +746,7 @@
   for (i = 0; i < num_records; i++) {
     RecRecord *r1 = &(g_records[i]);
 
-    if (REC_TYPE_IS_STAT(r1->rec_type)) {
+    if (!REC_TYPE_IS_STAT(r1->rec_type)) {
       continue;
     }