Lines Matching refs:old_stats
313 static void diff_stats(struct data *old_stats, struct data *new_stats) {
314 while (old_stats->name != NULL || new_stats->name != NULL) {
316 if (old_stats->name == NULL) {
321 compare = compare_data(old_stats, new_stats);
325 // old_stats no longer present
326 if (old_stats->value != NULL) {
327 printf("%s -\n", old_stats->name);
329 ++old_stats;
339 if (old_stats->value != NULL) {
340 printf("%s -\n", old_stats->name);
342 } else if (old_stats->value == NULL) {
344 } else if (strcmp(old_stats->value, new_stats->value)) {
347 ++old_stats;
385 struct data *old_stats = malloc(sizeof(struct data));
386 old_stats->name = NULL;
387 old_stats->value = NULL;
394 diff_stats(old_stats, new_stats);
395 free_stats(old_stats);
396 old_stats = new_stats;