"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-thermal-zone.c" between
stress-ng-0.13.04.tar.xz and stress-ng-0.13.05.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

core-thermal-zone.c  (stress-ng-0.13.04.tar.xz):core-thermal-zone.c  (stress-ng-0.13.05.tar.xz)
skipping to change at line 100 skipping to change at line 100
(void)closedir(dir); (void)closedir(dir);
return -1; return -1;
} }
tz_info->type = NULL; tz_info->type = NULL;
if ((fp = fopen(path, "r")) != NULL) { if ((fp = fopen(path, "r")) != NULL) {
char type[128]; char type[128];
if (fgets(type, sizeof(type), fp) != NULL) { if (fgets(type, sizeof(type), fp) != NULL) {
type[strcspn(type, "\n")] = '\0'; type[strcspn(type, "\n")] = '\0';
tz_info->type = strdup(type); tz_info->type = strdup(type);
tz_info->type_instance = stress_tz_type_instance( *tz_info_list, tz_info->type); tz_info->type_instance = stress_tz_type_instance( *tz_info_list, type);
} }
(void)fclose(fp); (void)fclose(fp);
} }
if (!tz_info->type) { if (!tz_info->type) {
free(tz_info->path); free(tz_info->path);
free(tz_info); free(tz_info);
(void)closedir(dir); (void)closedir(dir);
return -1; return -1;
} }
tz_info->index = i++; tz_info->index = i++;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)