Changeset 3118
- Timestamp:
- 10/06/05 19:27:29 (8 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/prog/sensors/chips.c (modified) (366 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/prog/sensors/chips.c
r3025 r3118 30 30 31 31 static void print_label(const char *label, int space); 32 static void free_the_label(char **label);33 32 static void print_temp_info(float, float, float, int, int, int); 34 33 static inline float deg_ctof( float ); … … 100 99 } 101 100 102 void free_the_label(char **label)103 {104 if (*label)105 free(*label);106 *label = NULL;107 }108 109 101 int sensors_get_label_and_valid(sensors_chip_name name, int feature, char **label, 110 102 int *valid) … … 123 115 void print_vid_info(const sensors_chip_name *name, int f_vid, int f_vrm) 124 116 { 125 char *label = NULL;117 char *label; 126 118 int valid; 127 119 double vid, vrm; … … 137 129 } 138 130 } 139 free _the_label(&label);131 free(label); 140 132 } 141 133 … … 175 167 } else 176 168 printf("ERROR: Can't get temperature data!\n"); 177 free _the_label(&label);169 free(label); 178 170 } 179 171 … … 195 187 } else 196 188 printf("ERROR: Can't get temperature data!\n"); 197 free _the_label(&label);189 free(label); 198 190 } 199 191 … … 233 225 } else 234 226 printf("ERROR: Can't get temperature data!\n"); 235 free _the_label(&label);227 free(label); 236 228 237 229 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1021_REMOTE_TEMP, … … 263 255 } else 264 256 printf("ERROR: Can't get temperature data!\n"); 265 free _the_label(&label);257 free(label); 266 258 267 259 if (!strcmp(name->prefix,"adm1021")) { … … 275 267 } else 276 268 printf("ERROR: Can't get die-code data!\n"); 277 free _the_label(&label);269 free(label); 278 270 } 279 271 } … … 281 273 void print_adm9240(const sensors_chip_name *name) 282 274 { 283 char *label = NULL;275 char *label; 284 276 double cur,min,max,fdiv; 285 277 int alarms; … … 304 296 } else 305 297 printf("ERROR: Can't get IN0 data!\n"); 306 free _the_label(&label);298 free(label); 307 299 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_IN1,&label,&valid) && 308 300 !sensors_get_feature(*name,SENSORS_ADM9240_IN1,&cur) && … … 316 308 } else 317 309 printf("ERROR: Can't get IN1 data!\n"); 318 free _the_label(&label);310 free(label); 319 311 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_IN2,&label,&valid) && 320 312 !sensors_get_feature(*name,SENSORS_ADM9240_IN2,&cur) && … … 328 320 } else 329 321 printf("ERROR: Can't get IN2 data!\n"); 330 free _the_label(&label);322 free(label); 331 323 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_IN3,&label,&valid) && 332 324 !sensors_get_feature(*name,SENSORS_ADM9240_IN3,&cur) && … … 340 332 } else 341 333 printf("ERROR: Can't get IN3 data!\n"); 342 free _the_label(&label);334 free(label); 343 335 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_IN4,&label,&valid) && 344 336 !sensors_get_feature(*name,SENSORS_ADM9240_IN4,&cur) && … … 352 344 } else 353 345 printf("ERROR: Can't get IN4 data!\n"); 354 free _the_label(&label);346 free(label); 355 347 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_IN5,&label,&valid) && 356 348 !sensors_get_feature(*name,SENSORS_ADM9240_IN5,&cur) && … … 364 356 } else 365 357 printf("ERROR: Can't get IN5 data!\n"); 366 free _the_label(&label);358 free(label); 367 359 368 360 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_FAN1,&label,&valid) && … … 377 369 } else 378 370 printf("ERROR: Can't get FAN1 data!\n"); 379 free _the_label(&label);371 free(label); 380 372 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_FAN2,&label,&valid) && 381 373 !sensors_get_feature(*name,SENSORS_ADM9240_FAN2,&cur) && … … 389 381 } else 390 382 printf("ERROR: Can't get FAN2 data!\n"); 391 free _the_label(&label);383 free(label); 392 384 393 385 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_TEMP,&label,&valid) && … … 402 394 } else 403 395 printf("ERROR: Can't get TEMP data!\n"); 404 free _the_label(&label);396 free(label); 405 397 406 398 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_VID,&label,&valid) && … … 411 403 } 412 404 } 413 free _the_label(&label);405 free(label); 414 406 415 407 if (!sensors_get_label_and_valid(*name,SENSORS_ADM9240_ALARMS,&label,&valid)) { … … 422 414 } 423 415 } 424 free _the_label(&label);416 free(label); 425 417 } 426 418 427 419 void print_adm1024(const sensors_chip_name *name) 428 420 { 429 char *label = NULL;421 char *label; 430 422 double cur,min,max,fdiv; 431 423 int alarms; … … 450 442 } else 451 443 printf("ERROR: Can't get IN0 data!\n"); 452 free _the_label(&label);444 free(label); 453 445 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN1,&label,&valid) && 454 446 !sensors_get_feature(*name,SENSORS_ADM1024_IN1,&cur) && … … 462 454 } else 463 455 printf("ERROR: Can't get IN1 data!\n"); 464 free _the_label(&label);456 free(label); 465 457 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN2,&label,&valid) && 466 458 !sensors_get_feature(*name,SENSORS_ADM1024_IN2,&cur) && … … 474 466 } else 475 467 printf("ERROR: Can't get IN2 data!\n"); 476 free _the_label(&label);468 free(label); 477 469 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN3,&label,&valid) && 478 470 !sensors_get_feature(*name,SENSORS_ADM1024_IN3,&cur) && … … 486 478 } else 487 479 printf("ERROR: Can't get IN3 data!\n"); 488 free _the_label(&label);480 free(label); 489 481 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN4,&label,&valid) && 490 482 !sensors_get_feature(*name,SENSORS_ADM1024_IN4,&cur) && … … 498 490 } else 499 491 printf("ERROR: Can't get IN4 data!\n"); 500 free _the_label(&label);492 free(label); 501 493 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_IN5,&label,&valid) && 502 494 !sensors_get_feature(*name,SENSORS_ADM1024_IN5,&cur) && … … 510 502 } else 511 503 printf("ERROR: Can't get IN5 data!\n"); 512 free _the_label(&label);504 free(label); 513 505 514 506 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_FAN1,&label,&valid) && … … 523 515 } else 524 516 printf("ERROR: Can't get FAN1 data!\n"); 525 free _the_label(&label);517 free(label); 526 518 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_FAN2,&label,&valid) && 527 519 !sensors_get_feature(*name,SENSORS_ADM1024_FAN2,&cur) && … … 535 527 } else 536 528 printf("ERROR: Can't get FAN2 data!\n"); 537 free _the_label(&label);529 free(label); 538 530 539 531 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_TEMP,&label,&valid) && … … 548 540 } else 549 541 printf("ERROR: Can't get TEMP data!\n"); 550 free _the_label(&label);542 free(label); 551 543 552 544 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_TEMP1,&label,&valid) && … … 561 553 } else 562 554 printf("ERROR: Can't get TEMP1 data!\n"); 563 free _the_label(&label);555 free(label); 564 556 565 557 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_TEMP2,&label,&valid) && … … 574 566 } else 575 567 printf("ERROR: Can't get TEMP2 data!\n"); 576 free _the_label(&label);568 free(label); 577 569 578 570 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_VID,&label,&valid) && … … 583 575 } 584 576 } 585 free _the_label(&label);577 free(label); 586 578 587 579 if (!sensors_get_label_and_valid(*name,SENSORS_ADM1024_ALARMS,&label,&valid)) { … … 594 586 } 595 587 } 596 free _the_label(&label);588 free(label); 597 589 } 598 590 599 591 void print_sis5595(const sensors_chip_name *name) 600 592 { 601 char *label = NULL;593 char *label; 602 594 double cur,min,max,fdiv; 603 595 int alarms,valid; … … 621 613 } else 622 614 printf("ERROR: Can't get IN0 data!\n"); 623 free _the_label(&label);615 free(label); 624 616 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_IN1,&label,&valid) && 625 617 !sensors_get_feature(*name,SENSORS_SIS5595_IN1,&cur) && … … 633 625 } else 634 626 printf("ERROR: Can't get IN1 data!\n"); 635 free _the_label(&label);627 free(label); 636 628 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_IN2,&label,&valid) && 637 629 !sensors_get_feature(*name,SENSORS_SIS5595_IN2,&cur) && … … 645 637 } else 646 638 printf("ERROR: Can't get IN2 data!\n"); 647 free _the_label(&label);639 free(label); 648 640 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_IN3,&label,&valid) && 649 641 !sensors_get_feature(*name,SENSORS_SIS5595_IN3,&cur) && … … 657 649 } else 658 650 printf("ERROR: Can't get IN3 data!\n"); 659 free _the_label(&label);651 free(label); 660 652 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_IN4,&label,&valid) && 661 653 !sensors_get_feature(*name,SENSORS_SIS5595_IN4,&cur) && … … 670 662 /* No error if IN4 is missing as it will happen with 2.6 kernels when 671 663 the chip is configured in 4 voltage + 1 temperature sensors. */ 672 free _the_label(&label);664 free(label); 673 665 674 666 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_FAN1,&label,&valid) && … … 683 675 } else 684 676 printf("ERROR: Can't get FAN1 data!\n"); 685 free _the_label(&label);677 free(label); 686 678 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_FAN2,&label,&valid) && 687 679 !sensors_get_feature(*name,SENSORS_SIS5595_FAN2,&cur) && … … 695 687 } else 696 688 printf("ERROR: Can't get FAN2 data!\n"); 697 free _the_label(&label);689 free(label); 698 690 699 691 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_TEMP,&label,&valid) && … … 709 701 /* No error if TEMP is missing as it will happen with 2.6 kernels when 710 702 the chip is configured in 5 voltage sensors mode. */ 711 free _the_label(&label);703 free(label); 712 704 713 705 if (!sensors_get_label_and_valid(*name,SENSORS_SIS5595_ALARMS,&label,&valid) … … 717 709 alarms & SIS5595_ALARM_BTI ?"ALARM":" "); 718 710 } 719 free _the_label(&label);711 free(label); 720 712 721 713 } … … 723 715 void print_via686a(const sensors_chip_name *name) 724 716 { 725 char *label = NULL;717 char *label; 726 718 double cur,min,max,fdiv; 727 719 int alarms,valid; … … 745 737 } else 746 738 printf("ERROR: Can't get IN0 data!\n"); 747 free _the_label(&label);739 free(label); 748 740 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_IN1,&label,&valid) && 749 741 !sensors_get_feature(*name,SENSORS_VIA686A_IN1,&cur) && … … 757 749 } else 758 750 printf("ERROR: Can't get IN1 data!\n"); 759 free _the_label(&label);751 free(label); 760 752 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_IN2,&label,&valid) && 761 753 !sensors_get_feature(*name,SENSORS_VIA686A_IN2,&cur) && … … 769 761 } else 770 762 printf("ERROR: Can't get IN2 data!\n"); 771 free _the_label(&label);763 free(label); 772 764 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_IN3,&label,&valid) && 773 765 !sensors_get_feature(*name,SENSORS_VIA686A_IN3,&cur) && … … 781 773 } else 782 774 printf("ERROR: Can't get IN3 data!\n"); 783 free _the_label(&label);775 free(label); 784 776 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_IN4,&label,&valid) && 785 777 !sensors_get_feature(*name,SENSORS_VIA686A_IN4,&cur) && … … 793 785 } else 794 786 printf("ERROR: Can't get IN4 data!\n"); 795 free _the_label(&label);787 free(label); 796 788 797 789 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_FAN1,&label,&valid) && … … 806 798 } else 807 799 printf("ERROR: Can't get FAN1 data!\n"); 808 free _the_label(&label);800 free(label); 809 801 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_FAN2,&label,&valid) && 810 802 !sensors_get_feature(*name,SENSORS_VIA686A_FAN2,&cur) && … … 818 810 } else 819 811 printf("ERROR: Can't get FAN2 data!\n"); 820 free _the_label(&label);812 free(label); 821 813 822 814 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_TEMP,&label,&valid) && … … 831 823 } else 832 824 printf("ERROR: Can't get TEMP data!\n"); 833 free _the_label(&label);825 free(label); 834 826 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_TEMP2,&label,&valid) && 835 827 !sensors_get_feature(*name,SENSORS_VIA686A_TEMP2,&cur) && … … 843 835 } else 844 836 printf("ERROR: Can't get TEMP2 data!\n"); 845 free _the_label(&label);837 free(label); 846 838 if (!sensors_get_label_and_valid(*name,SENSORS_VIA686A_TEMP3,&label,&valid) && 847 839 !sensors_get_feature(*name,SENSORS_VIA686A_TEMP3,&cur) && … … 855 847 } else 856 848 printf("ERROR: Can't get TEMP3 data!\n"); 857 free _the_label(&label);849 free(label); 858 850 859 851 } … … 861 853 void print_lm78(const sensors_chip_name *name) 862 854 { 863 char *label = NULL;855 char *label; 864 856 double cur,min,max,fdiv; 865 857 int alarms,valid; … … 884 876 } else 885 877 printf("ERROR: Can't get IN0 data!\n"); 886 free _the_label(&label);878 free(label); 887 879 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_IN1,&label,&valid) && 888 880 !sensors_get_feature(*name,SENSORS_LM78_IN1,&cur) && … … 896 888 } else 897 889 printf("ERROR: Can't get IN1 data!\n"); 898 free _the_label(&label);890 free(label); 899 891 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_IN2,&label,&valid) && 900 892 !sensors_get_feature(*name,SENSORS_LM78_IN2,&cur) && … … 908 900 } else 909 901 printf("ERROR: Can't get IN2 data!\n"); 910 free _the_label(&label);902 free(label); 911 903 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_IN3,&label,&valid) && 912 904 !sensors_get_feature(*name,SENSORS_LM78_IN3,&cur) && … … 920 912 } else 921 913 printf("ERROR: Can't get IN3 data!\n"); 922 free _the_label(&label);914 free(label); 923 915 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_IN4,&label,&valid) && 924 916 !sensors_get_feature(*name,SENSORS_LM78_IN4,&cur) && … … 932 924 } else 933 925 printf("ERROR: Can't get IN4 data!\n"); 934 free _the_label(&label);926 free(label); 935 927 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_IN5,&label,&valid) && 936 928 !sensors_get_feature(*name,SENSORS_LM78_IN5,&cur) && … … 944 936 } else 945 937 printf("ERROR: Can't get IN5 data!\n"); 946 free _the_label(&label);938 free(label); 947 939 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_IN6,&label,&valid) && 948 940 !sensors_get_feature(*name,SENSORS_LM78_IN6,&cur) && … … 956 948 } else 957 949 printf("ERROR: Can't get IN6 data!\n"); 958 free _the_label(&label);950 free(label); 959 951 960 952 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_FAN1,&label,&valid) && … … 969 961 } else 970 962 printf("ERROR: Can't get FAN1 data!\n"); 971 free _the_label(&label);963 free(label); 972 964 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_FAN2,&label,&valid) && 973 965 !sensors_get_feature(*name,SENSORS_LM78_FAN2,&cur) && … … 981 973 } else 982 974 printf("ERROR: Can't get FAN2 data!\n"); 983 free _the_label(&label);975 free(label); 984 976 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_FAN3,&label,&valid) && 985 977 !sensors_get_feature(*name,SENSORS_LM78_FAN3,&cur) && … … 993 985 } else 994 986 printf("ERROR: Can't get FAN3 data!\n"); 995 free _the_label(&label);987 free(label); 996 988 997 989 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_TEMP,&label,&valid) && … … 1006 998 } else 1007 999 printf("ERROR: Can't get TEMP data!\n"); 1008 free _the_label(&label);1000 free(label); 1009 1001 1010 1002 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_VID,&label,&valid) && … … 1015 1007 } 1016 1008 } 1017 free _the_label(&label);1009 free(label); 1018 1010 1019 1011 if (!sensors_get_label_and_valid(*name,SENSORS_LM78_ALARMS,&label,&valid) … … 1028 1020 } 1029 1021 } 1030 free _the_label(&label);1022 free(label); 1031 1023 } 1032 1024 1033 1025 void print_gl518(const sensors_chip_name *name) 1034 1026 { 1035 char *label = NULL;1027 char *label; 1036 1028 double cur,min,max,fdiv; 1037 1029 int alarms,beeps,valid; … … 1069 1061 } else 1070 1062 printf("ERROR: Can't get VDD data!\n"); 1071 free _the_label(&label);1063 free(label); 1072 1064 1073 1065 if (!sensors_get_label_and_valid(*name,SENSORS_GL518_VIN1,&label,&valid) && … … 1087 1079 } else 1088 1080 printf("ERROR: Can't get VIN1 data!\n"); 1089 free _the_label(&label);1081 free(label); 1090 1082 1091 1083 if (!sensors_get_label_and_valid(*name,SENSORS_GL518_VIN2,&label,&valid) && … … 1105 1097 } else 1106 1098 printf("ERROR: Can't get VIN2 data!\n"); 1107 free _the_label(&label);1099 free(label); 1108 1100 1109 1101 if (!sensors_get_label_and_valid(*name,SENSORS_GL518_VIN3,&label,&valid) && … … 1119 1111 } else 1120 1112 printf("ERROR: Can't get VIN3 data!\n"); 1121 free _the_label(&label);1113 free(label); 1122 1114 1123 1115 if (!sensors_get_label_and_valid(*name,SENSORS_GL518_FAN1,&label,&valid) && … … 1133 1125 } else 1134 1126 printf("ERROR: Can't get FAN1 data!\n"); 1135 free _the_label(&label);1127 free(label); 1136 1128 1137 1129 if (!sensors_get_label_and_valid(*name,SENSORS_GL518_FAN2,&label,&valid) && … … 1147 1139 } else 1148 1140 printf("ERROR: Can't get FAN2 data!\n"); 1149 free _the_label(&label);1141 free(label); 1150 1142 1151 1143 if (!sensors_get_label_and_valid(*name,SENSORS_GL518_TEMP,&label,&valid) && … … 1161 1153 } else 1162 1154 printf("ERROR: Can't get TEMP data!\n"); 1163 free _the_label(&label);1155 free(label); 1164 1156 1165 1157 if (!sensors_get_label_and_valid(*name,SENSORS_GL518_BEEP_ENABLE,&label,&valid) … … 1174 1166 printf("ERROR: Can't get BEEP ENABLE data!\n"); 1175 1167 } 1176 free _the_label(&label);1168 free(label); 1177 1169 } 1178 1170 1179 1171 void print_gl520(const sensors_chip_name *name) 1180 1172 { 1181 char *label = NULL;1173 char *label; 1182 1174 double cur,min,max; 1183 1175 int alarms,beeps,valid; … … 1205 1197 } else 1206 1198 printf("ERROR: Can't get VID data!\n"); 1207 free _the_label(&label);1199 free(label); 1208 1200 1209 1201 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_VDD,&label,&valid) && … … 1220 1212 } else 1221 1213 printf("ERROR: Can't get VDD data!\n"); 1222 free _the_label(&label);1214 free(label); 1223 1215 1224 1216 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_VIN1,&label,&valid) && … … 1235 1227 } else 1236 1228 printf("ERROR: Can't get VIN1 data!\n"); 1237 free _the_label(&label);1229 free(label); 1238 1230 1239 1231 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_VIN2,&label,&valid) && … … 1250 1242 } else 1251 1243 printf("ERROR: Can't get VIN2 data!\n"); 1252 free _the_label(&label);1244 free(label); 1253 1245 1254 1246 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_VIN3,&label,&valid) && … … 1264 1256 } else 1265 1257 printf("ERROR: Can't get VIN3 data!\n"); 1266 free _the_label(&label);1258 free(label); 1267 1259 1268 1260 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_VIN4,&label,&valid) && … … 1278 1270 } else 1279 1271 two_temps = 1; 1280 free _the_label(&label);1272 free(label); 1281 1273 1282 1274 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_FAN1,&label,&valid) && … … 1292 1284 } else 1293 1285 printf("ERROR: Can't get FAN1 data!\n"); 1294 free _the_label(&label);1286 free(label); 1295 1287 1296 1288 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_FAN2,&label,&valid) && … … 1306 1298 } else 1307 1299 printf("ERROR: Can't get FAN2 data!\n"); 1308 free _the_label(&label);1300 free(label); 1309 1301 1310 1302 if (!sensors_get_label_and_valid(*name,SENSORS_GL520_TEMP1,&label,&valid) && … … 1320 1312 } else 1321 1313 printf("ERROR: Can't get TEMP1 data!\n"); 1322 free _the_label(&label);1314 free(label); 1323 1315 1324 1316 if (two_temps) { … … 1335 1327 } else 1336 1328 printf("ERROR: Can't get TEMP2 or VIN4 data!\n"); 1337 free _the_label(&label);1329 free(label); 1338 1330 } 1339 1331 … … 1349 1341 printf("ERROR: Can't get BEEP ENABLE data!\n"); 1350 1342 } 1351 free _the_label(&label);1343 free(label); 1352 1344 } 1353 1345 1354 1346 void print_adm1025(const sensors_chip_name *name) 1355 1347 { 1356 char *label = NULL;1348 char *label; 1357 1349 double cur,min,max; 1358 1350 int alarms,valid,i; … … 1378 1370 if (i!=4) /* Chip may have +12V input used for VID instead */ 1379 1371 printf("ERROR: Can't get IN%d data!\n", i); 1380 free _the_label(&label);1372 free(label); 1381 1373 } 1382 1374 … … 1394 1386 } else 1395 1387 printf("ERROR: Can't get TEMP%d data!\n", i+1); 1396 free _the_label(&label);1388 free(label); 1397 1389 } 1398 1390 … … 1402 1394 void print_lm80(const sensors_chip_name *name) 1403 1395 { 1404 char *label = NULL;1396 char *label; 1405 1397 double cur,min,max,min2,max2,fdiv; 1406 1398 int alarms,valid; … … 1424 1416 } else 1425 1417 printf("ERROR: Can't get IN0 data!\n"); 1426 free _the_label(&label);1418 free(label); 1427 1419 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_IN1,&label,&valid) && 1428 1420 !sensors_get_feature(*name,SENSORS_LM80_IN1,&cur) && … … 1436 1428 } else 1437 1429 printf("ERROR: Can't get IN1 data!\n"); 1438 free _the_label(&label);1430 free(label); 1439 1431 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_IN2,&label,&valid) && 1440 1432 !sensors_get_feature(*name,SENSORS_LM80_IN2,&cur) && … … 1448 1440 } else 1449 1441 printf("ERROR: Can't get IN2 data!\n"); 1450 free _the_label(&label);1442 free(label); 1451 1443 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_IN3,&label,&valid) && 1452 1444 !sensors_get_feature(*name,SENSORS_LM80_IN3,&cur) && … … 1460 1452 } else 1461 1453 printf("ERROR: Can't get IN3 data!\n"); 1462 free _the_label(&label);1454 free(label); 1463 1455 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_IN4,&label,&valid) && 1464 1456 !sensors_get_feature(*name,SENSORS_LM80_IN4,&cur) && … … 1472 1464 } else 1473 1465 printf("ERROR: Can't get IN4 data!\n"); 1474 free _the_label(&label);1466 free(label); 1475 1467 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_IN5,&label,&valid) && 1476 1468 !sensors_get_feature(*name,SENSORS_LM80_IN5,&cur) && … … 1484 1476 } else 1485 1477 printf("ERROR: Can't get IN5 data!\n"); 1486 free _the_label(&label);1478 free(label); 1487 1479 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_IN6,&label,&valid) && 1488 1480 !sensors_get_feature(*name,SENSORS_LM80_IN6,&cur) && … … 1496 1488 } else 1497 1489 printf("ERROR: Can't get IN6 data!\n"); 1498 free _the_label(&label);1490 free(label); 1499 1491 1500 1492 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_FAN1,&label,&valid) && … … 1509 1501 } else 1510 1502 printf("ERROR: Can't get FAN1 data!\n"); 1511 free _the_label(&label);1503 free(label); 1512 1504 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_FAN2,&label,&valid) && 1513 1505 !sensors_get_feature(*name,SENSORS_LM80_FAN2,&cur) && … … 1521 1513 } else 1522 1514 printf("ERROR: Can't get FAN2 data!\n"); 1523 free _the_label(&label);1515 free(label); 1524 1516 1525 1517 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_TEMP,&label,&valid) && … … 1549 1541 } else 1550 1542 printf("ERROR: Can't get TEMP data!\n"); 1551 free _the_label(&label);1543 free(label); 1552 1544 1553 1545 if (!sensors_get_label_and_valid(*name,SENSORS_LM80_ALARMS,&label,&valid) … … 1562 1554 } 1563 1555 } 1564 free _the_label(&label);1556 free(label); 1565 1557 } 1566 1558 1567 1559 void print_lm85(const sensors_chip_name *name) 1568 1560 { 1569 char *label = NULL;1561 char *label; 1570 1562 double cur, min, max; 1571 1563 int alarms, alarm_mask = 0, valid; … … 1604 1596 } else 1605 1597 printf("ERROR: Can't get IN0 data!\n"); 1606 free _the_label(&label);1598 free(label); 1607 1599 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN1,&label,&valid) && 1608 1600 !sensors_get_feature(*name,SENSORS_LM85_IN1,&cur) && … … 1618 1610 } else 1619 1611 printf("ERROR: Can't get IN1 data!\n"); 1620 free _the_label(&label);1612 free(label); 1621 1613 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN2,&label,&valid) && 1622 1614 !sensors_get_feature(*name,SENSORS_LM85_IN2,&cur) && … … 1632 1624 } else 1633 1625 printf("ERROR: Can't get IN2 data!\n"); 1634 free _the_label(&label);1626 free(label); 1635 1627 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN3,&label,&valid) && 1636 1628 !sensors_get_feature(*name,SENSORS_LM85_IN3,&cur) && … … 1646 1638 } else 1647 1639 printf("ERROR: Can't get IN3 data!\n"); 1648 free _the_label(&label);1640 free(label); 1649 1641 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN4,&label,&valid) && 1650 1642 !sensors_get_feature(*name,SENSORS_LM85_IN4,&cur) && … … 1660 1652 } else 1661 1653 printf("ERROR: Can't get IN4 data!\n"); 1662 free _the_label(&label);1654 free(label); 1663 1655 1664 1656 if( is6d100 ) { … … 1674 1666 } else 1675 1667 printf("ERROR: Can't get IN5 data!\n"); 1676 free _the_label(&label);1668 free(label); 1677 1669 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN6,&label,&valid) && 1678 1670 !sensors_get_feature(*name,SENSORS_LM85_IN6,&cur) && … … 1686 1678 } else 1687 1679 printf("ERROR: Can't get IN6 data!\n"); 1688 free _the_label(&label);1680 free(label); 1689 1681 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_IN7,&label,&valid) && 1690 1682 !sensors_get_feature(*name,SENSORS_LM85_IN7,&cur) && … … 1698 1690 } else 1699 1691 printf("ERROR: Can't get IN7 data!\n"); 1700 free _the_label(&label);1692 free(label); 1701 1693 } 1702 1694 … … 1713 1705 } else 1714 1706 printf("ERROR: Can't get FAN1 data!\n"); 1715 free _the_label(&label);1707 free(label); 1716 1708 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_FAN2,&label,&valid) && 1717 1709 !sensors_get_feature(*name,SENSORS_LM85_FAN2,&cur) && … … 1726 1718 } else 1727 1719 printf("ERROR: Can't get FAN2 data!\n"); 1728 free _the_label(&label);1720 free(label); 1729 1721 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_FAN3,&label,&valid) && 1730 1722 !sensors_get_feature(*name,SENSORS_LM85_FAN3,&cur) && … … 1739 1731 } else 1740 1732 printf("ERROR: Can't get FAN3 data!\n"); 1741 free _the_label(&label);1733 free(label); 1742 1734 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_FAN4,&label,&valid) && 1743 1735 !sensors_get_feature(*name,SENSORS_LM85_FAN4,&cur) && … … 1752 1744 } else 1753 1745 printf("ERROR: Can't get FAN4 data!\n"); 1754 free _the_label(&label);1746 free(label); 1755 1747 1756 1748 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_TEMP1,&label,&valid) && … … 1769 1761 } else 1770 1762 printf("ERROR: Can't get TEMP1 data!\n"); 1771 free _the_label(&label);1763 free(label); 1772 1764 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_TEMP2,&label,&valid) && 1773 1765 !sensors_get_feature(*name,SENSORS_LM85_TEMP2,&cur) && … … 1784 1776 } else 1785 1777 printf("ERROR: Can't get TEMP2 data!\n"); 1786 free _the_label(&label);1778 free(label); 1787 1779 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_TEMP3,&label,&valid) && 1788 1780 !sensors_get_feature(*name,SENSORS_LM85_TEMP3,&cur) && … … 1800 1792 } else 1801 1793 printf("ERROR: Can't get TEMP3 data!\n"); 1802 free _the_label(&label);1794 free(label); 1803 1795 1804 1796 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_PWM1,&label,&valid) && … … 1810 1802 } else 1811 1803 printf("ERROR: Can't get PWM1 data!\n"); 1812 free _the_label(&label);1804 free(label); 1813 1805 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_PWM2,&label,&valid) && 1814 1806 !sensors_get_feature(*name,SENSORS_LM85_PWM2,&cur)) { … … 1819 1811 } else 1820 1812 printf("ERROR: Can't get PWM2 data!\n"); 1821 free _the_label(&label);1813 free(label); 1822 1814 if (!sensors_get_label_and_valid(*name,SENSORS_LM85_PWM3,&label,&valid) && 1823 1815 !sensors_get_feature(*name,SENSORS_LM85_PWM3,&cur)) { … … 1828 1820 } else 1829 1821 printf("ERROR: Can't get PWM3 data!\n"); 1830 free _the_label(&label);1822 free(label); 1831 1823 1832 1824 print_vid_info(name, SENSORS_LM85_VID, SENSORS_LM85_VRM); … … 1835 1827 void print_lm87(const sensors_chip_name *name) 1836 1828 { 1837 char *label = NULL;1829 char *label; 1838 1830 double cur,min,max,fdiv; 1839 1831 int alarms,valid; … … 1857 1849 } 1858 1850 } 1859 free _the_label(&label);1851 free(label); 1860 1852 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_IN1,&label,&valid) && 1861 1853 !sensors_get_feature(*name,SENSORS_LM87_IN1,&cur) && … … 1869 1861 } else 1870 1862 printf("ERROR: Can't get IN1 data!\n"); 1871 free _the_label(&label);1863 free(label); 1872 1864 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_IN2,&label,&valid) && 1873 1865 !sensors_get_feature(*name,SENSORS_LM87_IN2,&cur) && … … 1880 1872 } 1881 1873 } 1882 free _the_label(&label);1874 free(label); 1883 1875 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_IN3,&label,&valid) && 1884 1876 !sensors_get_feature(*name,SENSORS_LM87_IN3,&cur) && … … 1892 1884 } else 1893 1885 printf("ERROR: Can't get IN3 data!\n"); 1894 free _the_label(&label);1886 free(label); 1895 1887 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_IN4,&label,&valid) && 1896 1888 !sensors_get_feature(*name,SENSORS_LM87_IN4,&cur) && … … 1904 1896 } else 1905 1897 printf("ERROR: Can't get IN4 data!\n"); 1906 free _the_label(&label);1898 free(label); 1907 1899 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_IN5,&label,&valid) && 1908 1900 !sensors_get_feature(*name,SENSORS_LM87_IN5,&cur) && … … 1915 1907 } 1916 1908 } 1917 free _the_label(&label);1909 free(label); 1918 1910 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_AIN1,&label,&valid) && 1919 1911 !sensors_get_feature(*name,SENSORS_LM87_AIN1,&cur) && … … 1926 1918 } 1927 1919 } 1928 free _the_label(&label);1920 free(label); 1929 1921 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_AIN2,&label,&valid) && 1930 1922 !sensors_get_feature(*name,SENSORS_LM87_AIN2,&cur) && … … 1937 1929 } 1938 1930 } 1939 free _the_label(&label);1931 free(label); 1940 1932 1941 1933 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_FAN1,&label,&valid) && … … 1949 1941 } 1950 1942 } 1951 free _the_label(&label);1943 free(label); 1952 1944 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_FAN2,&label,&valid) && 1953 1945 !sensors_get_feature(*name,SENSORS_LM87_FAN2,&cur) && … … 1960 1952 } 1961 1953 } 1962 free _the_label(&label);1954 free(label); 1963 1955 1964 1956 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_TEMP1,&label,&valid) && … … 1974 1966 } else 1975 1967 printf("ERROR: Can't get TEMP1 data!\n"); 1976 free _the_label(&label);1968 free(label); 1977 1969 1978 1970 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_TEMP2,&label,&valid) && … … 1988 1980 } else 1989 1981 printf("ERROR: Can't get TEMP2 data!\n"); 1990 free _the_label(&label);1982 free(label); 1991 1983 1992 1984 if (!sensors_get_label_and_valid(*name,SENSORS_LM87_TEMP3,&label,&valid) && … … 2001 1993 } 2002 1994 } 2003 free _the_label(&label);1995 free(label); 2004 1996 2005 1997 print_vid_info(name, SENSORS_LM87_VID, SENSORS_LM87_VRM); … … 2008 2000 void print_mtp008(const sensors_chip_name *name) 2009 2001 { 2010 char *label = NULL;2002 char *label; 2011 2003 double cur,min,max,fdiv; 2012 2004 int alarms,valid; … … 2031 2023 } else 2032 2024 printf("ERROR: Can't get IN0 data!\n"); 2033 free _the_label(&label);2025 free(label); 2034 2026 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_IN1,&label,&valid) && 2035 2027 !sensors_get_feature(*name,SENSORS_MTP008_IN1,&cur) && … … 2043 2035 } else 2044 2036 printf("ERROR: Can't get IN1 data!\n"); 2045 free _the_label(&label);2037 free(label); 2046 2038 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_IN2,&label,&valid) && 2047 2039 !sensors_get_feature(*name,SENSORS_MTP008_IN2,&cur) && … … 2055 2047 } else 2056 2048 printf("ERROR: Can't get IN2 data!\n"); 2057 free _the_label(&label);2049 free(label); 2058 2050 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_IN3,&label,&valid) && 2059 2051 !sensors_get_feature(*name,SENSORS_MTP008_IN3,&cur) && … … 2067 2059 } else 2068 2060 printf("ERROR: Can't get IN3 data!\n"); 2069 free _the_label(&label);2061 free(label); 2070 2062 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_IN4,&label,&valid) && 2071 2063 !sensors_get_feature(*name,SENSORS_MTP008_IN4,&cur) && … … 2079 2071 } else 2080 2072 printf("ERROR: Can't get IN4 data!\n"); 2081 free _the_label(&label);2073 free(label); 2082 2074 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_IN5,&label,&valid) && 2083 2075 !sensors_get_feature(*name,SENSORS_MTP008_IN5,&cur) && … … 2091 2083 } else 2092 2084 printf("ERROR: Can't get IN5 data!\n"); 2093 free _the_label(&label);2085 free(label); 2094 2086 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_IN6,&label,&valid) && 2095 2087 !sensors_get_feature(*name,SENSORS_MTP008_IN6,&cur) && … … 2103 2095 } else 2104 2096 printf("ERROR: Can't get IN6 data!\n"); 2105 free _the_label(&label);2097 free(label); 2106 2098 2107 2099 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_FAN1,&label,&valid) && … … 2116 2108 } else 2117 2109 printf("ERROR: Can't get FAN1 data!\n"); 2118 free _the_label(&label);2110 free(label); 2119 2111 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_FAN2,&label,&valid) && 2120 2112 !sensors_get_feature(*name,SENSORS_MTP008_FAN2,&cur) && … … 2128 2120 } else 2129 2121 printf("ERROR: Can't get FAN2 data!\n"); 2130 free _the_label(&label);2122 free(label); 2131 2123 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_FAN3,&label,&valid) && 2132 2124 !sensors_get_feature(*name,SENSORS_MTP008_FAN3,&cur) && … … 2140 2132 } else 2141 2133 printf("ERROR: Can't get FAN3 data!\n"); 2142 free _the_label(&label);2134 free(label); 2143 2135 2144 2136 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_TEMP1,&label,&valid) && … … 2153 2145 } else 2154 2146 printf("ERROR: Can't get TEMP1 data!\n"); 2155 free _the_label(&label);2147 free(label); 2156 2148 2157 2149 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_TEMP2,&label,&valid) && … … 2166 2158 } else 2167 2159 printf("ERROR: Can't get TEMP2 data!\n"); 2168 free _the_label(&label);2160 free(label); 2169 2161 2170 2162 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_TEMP3,&label,&valid) && … … 2179 2171 } else 2180 2172 printf("ERROR: Can't get TEMP3 data!\n"); 2181 free _the_label(&label);2173 free(label); 2182 2174 2183 2175 if (!sensors_get_label_and_valid(*name,SENSORS_MTP008_VID,&label,&valid) && … … 2188 2180 } 2189 2181 } 2190 free _the_label(&label);2182 free(label); 2191 2183 } 2192 2184 2193 2185 void print_w83781d(const sensors_chip_name *name) 2194 2186 { 2195 char *label = NULL;2187 char *label; 2196 2188 double cur,min,max,fdiv,sens; 2197 2189 int alarms,beeps; … … 2234 2226 } else 2235 2227 printf("ERROR: Can't get IN0 data!\n"); 2236 free _the_label(&label);2228 free(label); 2237 2229 if ((!is83s) && (!is697hf)) { 2238 2230 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_IN1,&label,&valid) && … … 2248 2240 } else 2249 2241 printf("ERROR: Can't get IN1 data!\n"); 2250 free _the_label(&label);2242 free(label); 2251 2243 } 2252 2244 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_IN2,&label,&valid) && … … 2262 2254 } else 2263 2255 printf("ERROR: Can't get IN2 data!\n"); 2264 free _the_label(&label);2256 free(label); 2265 2257 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_IN3,&label,&valid) && 2266 2258 !sensors_get_feature(*name,SENSORS_W83781D_IN3,&cur) && … … 2275 2267 } else 2276 2268 printf("ERROR: Can't get IN3 data!\n"); 2277 free _the_label(&label);2269 free(label); 2278 2270 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_IN4,&label,&valid) && 2279 2271 !sensors_get_feature(*name,SENSORS_W83781D_IN4,&cur) && … … 2288 2280 } else 2289 2281 printf("ERROR: Can't get IN4 data!\n"); 2290 free _the_label(&label);2282 free(label); 2291 2283 if (!is627thf) { 2292 2284 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_IN5,&label,&valid) && … … 2302 2294 } else 2303 2295 printf("ERROR: Can't get IN5 data!\n"); 2304 free _the_label(&label);2296 free(label); 2305 2297 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_IN6,&label,&valid) && 2306 2298 !sensors_get_feature(*name,SENSORS_W83781D_IN6,&cur) && … … 2315 2307 } else 2316 2308 printf("ERROR: Can't get IN6 data!\n"); 2317 free _the_label(&label);2309 free(label); 2318 2310 } /* !is627thf */ 2319 2311 if (is82d || is697hf || is627thf) { … … 2330 2322 } else 2331 2323 printf("ERROR: Can't get IN7 data!\n"); 2332 free _the_label(&label);2324 free(label); 2333 2325 if (!sensors_get_label_and_valid(*name,SENSORS_W83782D_IN8,&label,&valid) && 2334 2326 !sensors_get_feature(*name,SENSORS_W83782D_IN8,&cur) && … … 2343 2335 } else 2344 2336 printf("ERROR: Can't get IN8 data!\n"); 2345 free _the_label(&label);2337 free(label); 2346 2338 } 2347 2339 … … 2358 2350 } else 2359 2351 printf("ERROR: Can't get FAN1 data!\n"); 2360 free _the_label(&label);2352 free(label); 2361 2353 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_FAN2,&label,&valid) && 2362 2354 !sensors_get_feature(*name,SENSORS_W83781D_FAN2,&cur) && … … 2371 2363 } else 2372 2364 printf("ERROR: Can't get FAN2 data!\n"); 2373 free _the_label(&label);2365 free(label); 2374 2366 2375 2367 if(!is697hf) { … … 2386 2378 } else 2387 2379 printf("ERROR: Can't get FAN3 data!\n"); 2388 free _the_label(&label);2380 free(label); 2389 2381 } 2390 2382 … … 2421 2413 } else 2422 2414 printf("ERROR: Can't get TEMP1 data!\n"); 2423 free _the_label(&label);2415 free(label); 2424 2416 2425 2417 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_TEMP2,&label,&valid) && … … 2449 2441 } else 2450 2442 printf("ERROR: Can't get TEMP2 data!\n"); 2451 free _the_label(&label);2443 free(label); 2452 2444 2453 2445 if ((!is83s) && (!is697hf)) { … … 2482 2474 } else 2483 2475 printf("ERROR: Can't get TEMP3 data!\n"); 2484 free _the_label(&label);2476 free(label); 2485 2477 } 2486 2478 … … 2497 2489 printf("\n"); 2498 2490 } 2499 free _the_label(&label);2491 free(label); 2500 2492 2501 2493 if (!sensors_get_label_and_valid(*name,SENSORS_W83781D_BEEP_ENABLE,&label,&valid) … … 2510 2502 printf("ERROR: Can't get BEEP data!\n"); 2511 2503 } 2512 free _the_label(&label);2504 free(label); 2513 2505 } 2514 2506 … … 2516 2508 void print_w83792d(const sensors_chip_name *name) 2517 2509 { 2518 char *label = NULL;2510 char *label; 2519 2511 int alarms; 2520 2512 double cur,min,max,fdiv; … … 2539 2531 } else 2540 2532 printf("ERROR: Can't get IN0 data!\n"); 2541 free _the_label(&label);2533 free(label); 2542 2534 2543 2535 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN1,&label,&valid) && … … 2552 2544 } else 2553 2545 printf("ERROR: Can't get IN1 data!\n"); 2554 free _the_label(&label);2546 free(label); 2555 2547 2556 2548 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN2,&label,&valid) && … … 2565 2557 } else 2566 2558 printf("ERROR: Can't get IN2 data!\n"); 2567 free _the_label(&label);2559 free(label); 2568 2560 2569 2561 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN3,&label,&valid) && … … 2578 2570 } else 2579 2571 printf("ERROR: Can't get IN3 data!\n"); 2580 free _the_label(&label);2572 free(label); 2581 2573 2582 2574 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN4,&label,&valid) && … … 2591 2583 } else 2592 2584 printf("ERROR: Can't get IN4 data!\n"); 2593 free _the_label(&label);2585 free(label); 2594 2586 2595 2587 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN5,&label,&valid) && … … 2604 2596 } else 2605 2597 printf("ERROR: Can't get IN5 data!\n"); 2606 free _the_label(&label);2598 free(label); 2607 2599 2608 2600 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_IN6,&label,&valid) && … … 2617 2609 } else 2618 2610 printf("ERROR: Can't get IN6 data!\n"); 2619 free _the_label(&label);2611 free(label); 2620 2612 2621 2613 if (!sensors_get_label_and_valid(*name,SENSORS_W83782D_IN7,&label,&valid) && … … 2630 2622 } else 2631 2623 printf("ERROR: Can't get IN7 data!\n"); 2632 free _the_label(&label);2624 free(label); 2633 2625 2634 2626 if (!sensors_get_label_and_valid(*name,SENSORS_W83782D_IN8,&label,&valid) && … … 2643 2635 } else 2644 2636 printf("ERROR: Can't get IN8 data!\n"); 2645 free _the_label(&label);2637 free(label); 2646 2638 2647 2639 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN1,&label,&valid) && … … 2656 2648 } else 2657 2649 printf("ERROR: Can't get FAN1 data!\n"); 2658 free _the_label(&label);2650 free(label); 2659 2651 2660 2652 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN2,&label,&valid) && … … 2669 2661 } else 2670 2662 printf("ERROR: Can't get FAN2 data!\n"); 2671 free _the_label(&label);2663 free(label); 2672 2664 2673 2665 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN3,&label,&valid) && … … 2682 2674 } else 2683 2675 printf("ERROR: Can't get FAN3 data!\n"); 2684 free _the_label(&label);2676 free(label); 2685 2677 2686 2678 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN4,&label,&valid) && … … 2695 2687 } else 2696 2688 printf("ERROR: Can't get FAN4 data!\n"); 2697 free _the_label(&label);2689 free(label); 2698 2690 2699 2691 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN5,&label,&valid) && … … 2708 2700 } else 2709 2701 printf("ERROR: Can't get FAN5 data!\n"); 2710 free _the_label(&label);2702 free(label); 2711 2703 2712 2704 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN6,&label,&valid) && … … 2721 2713 } else 2722 2714 printf("ERROR: Can't get FAN6 data!\n"); 2723 free _the_label(&label);2715 free(label); 2724 2716 2725 2717 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_FAN7,&label,&valid) && … … 2734 2726 } else 2735 2727 printf("ERROR: Can't get FAN7 data!\n"); 2736 free _the_label(&label);2728 free(label); 2737 2729 2738 2730 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_TEMP1,&label,&valid) && … … 2752 2744 } else 2753 2745 printf("ERROR: Can't get TEMP1 data!\n"); 2754 free _the_label(&label);2746 free(label); 2755 2747 2756 2748 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_TEMP2,&label,&valid) && … … 2765 2757 } else 2766 2758 printf("ERROR: Can't get TEMP2 data!\n"); 2767 free _the_label(&label);2759 free(label); 2768 2760 2769 2761 if (!sensors_get_label_and_valid(*name,SENSORS_W83792D_TEMP3,&label,&valid) && … … 2778 2770 } else 2779 2771 printf("ERROR: Can't get TEMP3 data!\n"); 2780 free _the_label(&label);2772 free(label); 2781 2773 2782 2774 /* print_vid_info(name, SENSORS_W83792D_VID, SENSORS_W83792D_VRM); */ … … 2796 2788 printf("ERROR: Can't get Chassis data!\n"); 2797 2789 } 2798 free _the_label(&label);2790 free(label); 2799 2791 } 2800 2792 … … 2815 2807 } else 2816 2808 printf("ERROR: Can't get temperature data!\n"); 2817 free _the_label(&label);2809 free(label); 2818 2810 } 2819 2811 … … 2838 2830 } else if (i < 3) 2839 2831 printf("ERROR: Can't get FAN%d data!\n", i + 1); 2840 free _the_label(&label);2832 free(label); 2841 2833 } 2842 2834 … … 2855 2847 } else 2856 2848 printf("ERROR: Can't get TEMP%d data!\n", i + 1); 2857 free _the_label(&label);2849 free(label); 2858 2850 } 2859 2851 } … … 2861 2853 void print_maxilife(const sensors_chip_name *name) 2862 2854 { 2863 char *label = NULL;2855 char *label; 2864 2856 double cur, min, max; 2865 2857 int alarms,valid; … … 2883 2875 } else 2884 2876 printf("ERROR: Can't get TEMP1 data!\n"); 2885 free _the_label(&label);2877 free(label); 2886 2878 2887 2879 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_TEMP2, &label,&valid) && … … 2896 2888 } else 2897 2889 printf("ERROR: Can't get TEMP2 data!\n"); 2898 free _the_label(&label);2890 free(label); 2899 2891 2900 2892 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_TEMP3, &label,&valid) && … … 2909 2901 } else 2910 2902 printf("ERROR: Can't get TEMP3 data!\n"); 2911 free _the_label(&label);2903 free(label); 2912 2904 2913 2905 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_TEMP4, &label,&valid) && … … 2922 2914 } else 2923 2915 printf("ERROR: Can't get TEMP4 data!\n"); 2924 free _the_label(&label);2916 free(label); 2925 2917 2926 2918 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_TEMP5, &label,&valid) && … … 2935 2927 } else 2936 2928 printf("ERROR: Can't get TEMP5 data!\n"); 2937 free _the_label(&label);2929 free(label); 2938 2930 2939 2931 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_FAN1, &label,&valid) && … … 2952 2944 } else 2953 2945 printf("ERROR: Can't get FAN1 data!\n"); 2954 free _the_label(&label);2946 free(label); 2955 2947 2956 2948 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_FAN2, &label,&valid) && … … 2969 2961 } else 2970 2962 printf("ERROR: Can't get FAN2 data!\n"); 2971 free _the_label(&label);2963 free(label); 2972 2964 2973 2965 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_FAN3, &label,&valid) && … … 2986 2978 } else 2987 2979 printf("ERROR: Can't get FAN3 data!\n"); 2988 free _the_label(&label);2980 free(label); 2989 2981 2990 2982 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_PLL, &label,&valid) && … … 2999 2991 } else 3000 2992 printf("ERROR: Can't get PLL data!\n"); 3001 free _the_label(&label);2993 free(label); 3002 2994 3003 2995 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_VID1, &label,&valid) && … … 3012 3004 } else 3013 3005 printf("ERROR: Can't get VID1 data!\n"); 3014 free _the_label(&label);3006 free(label); 3015 3007 3016 3008 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_VID2, &label,&valid) && … … 3025 3017 } else 3026 3018 printf("ERROR: Can't get VID2 data!\n"); 3027 free _the_label(&label);3019 free(label); 3028 3020 3029 3021 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_VID3, &label,&valid) && … … 3038 3030 } else 3039 3031 printf("ERROR: Can't get VID3 data!\n"); 3040 free _the_label(&label);3032 free(label); 3041 3033 3042 3034 if (!sensors_get_label_and_valid(*name, SENSORS_MAXI_CG_VID4, &label,&valid) && … … 3051 3043 } else 3052 3044 printf("ERROR: Can't get VID4 data!\n"); 3053 free _the_label(&label);3045 free(label); 3054 3046 } 3055 3047 3056 3048 void print_ddcmon(const sensors_chip_name *name) 3057 3049 { 3058 char *label = NULL;3050 char *label; 3059 3051 double a, b, c; 3060 3052 int valid, i; … … 3071 3063 } else 3072 3064 printf("ERROR: data 1\n"); 3073 free _the_label(&label);3065 free(label); 3074 3066 3075 3067 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_PROD_ID, &label, &valid) … … 3082 3074 } else 3083 3075 printf("ERROR: data 2\n"); 3084 free _the_label(&label);3076 free(label); 3085 3077 3086 3078 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_SERIAL, &label,&valid) && … … 3092 3084 } else 3093 3085 printf("ERROR: data 3\n"); 3094 free _the_label(&label);3086 free(label); 3095 3087 3096 3088 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_YEAR, &label, &valid) … … 3103 3095 } else 3104 3096 printf("ERROR: data 4\n"); 3105 free _the_label(&label);3097 free(label); 3106 3098 3107 3099 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_EDID_VER, &label, &valid) … … 3114 3106 } else 3115 3107 printf("ERROR: data 5\n"); 3116 free _the_label(&label);3108 free(label); 3117 3109 3118 3110 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_VERSIZE, &label,&valid) && … … 3125 3117 } else 3126 3118 printf("ERROR: data 6\n"); 3127 free _the_label(&label);3119 free(label); 3128 3120 3129 3121 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_GAMMA, &label, &valid) … … 3135 3127 } else 3136 3128 printf("ERROR: data 7\n"); 3137 free _the_label(&label);3129 free(label); 3138 3130 3139 3131 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_DPMS, &label, &valid) … … 3155 3147 } else 3156 3148 printf("ERROR: data 8\n"); 3157 free _the_label(&label);3149 free(label); 3158 3150 3159 3151 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_TIMINGS, &label,&valid) && … … 3218 3210 } else 3219 3211 printf("ERROR: data 9\n"); 3220 free _the_label(&label);3212 free(label); 3221 3213 3222 3214 for(i = 0; i < 8; i++) { … … 3231 3223 } else 3232 3224 printf("ERROR: data 10-%d\n", i+1); 3233 free _the_label(&label);3225 free(label); 3234 3226 } 3235 3227 … … 3244 3236 } else 3245 3237 printf("ERROR: data 11\n"); 3246 free _the_label(&label);3238 free(label); 3247 3239 3248 3240 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_HORSYNCMIN, &label,&valid) && … … 3255 3247 } else 3256 3248 printf("ERROR: data 12\n"); 3257 free _the_label(&label);3249 free(label); 3258 3250 3259 3251 if (!sensors_get_label_and_valid(*name, SENSORS_DDCMON_MAXCLOCK, &label, &valid) … … 3265 3257 } else 3266 3258 printf("ERROR: data 13\n"); 3267 free _the_label(&label);3259 free(label); 3268 3260 3269 3261 printf("Note that the ddcmon driver is deprecated and will be deleted soon.\n"); … … 3284 3276 void print_eeprom(const sensors_chip_name *name) 3285 3277 { 3286 char *label = NULL;3278 char *label; 3287 3279 double a, b, c, d; 3288 3280 int valid, i, type; … … 3308 3300 print_label(label, 24); 3309 3301 printf("%s\n", buffer); 3310 free _the_label(&label);3302 free(label); 3311 3303 3312 3304 memset(buffer, '\0', i); … … 3321 3313 } else 3322 3314 printf("ERROR: data Vaio 3\n"); 3323 free _the_label(&label);3315 free(label); 3324 3316 3325 3317 return; … … 3327 3319 } else 3328 3320 printf("ERROR: data Vaio 2\n"); 3329 free _the_label(&label);3321 free(label); 3330 3322 } 3331 3323 … … 3352 3344 printf("%02X:%02X:%02X:%02X:%02X:%02X\n", buffer[0], 3353 3345 buffer[1], buffer[2], buffer[3], buffer[4], buffer[5]); 3354 free _the_label(&label);3346 free(label); 3355 3347 3356 3348 return; … … 3358 3350 } else 3359 3351 printf("ERROR: data Shuttle\n"); 3360 free _the_label(&label);3352 free(label); 3361 3353 } 3362 3354 … … 3394 3386 default: 3395 3387 printf("Unknown EEPROM type (%d)\n", type); 3396 free _the_label(&label);3388 free(label); 3397 3389 return; 3398 3390 } 3399 3391 } else { 3400 free _the_label(&label);3392 free(label); 3401 3393 return; 3402 3394 } 3403 3395 } else { 3404 free _the_label(&label);3396 free(label); 3405 3397 printf("Memory type: Unavailable\n"); 3406 3398 return; 3407 3399 } 3408 free _the_label(&label);3400 free(label); 3409 3401 3410 3402 if (type == 255) { /* EDID EEPROM */ … … 3455 3447 } else 3456 3448 printf("ERROR: data 2\n"); 3457 free _the_label(&label);3449 free(label); 3458 3450 } 3459 3451 3460 3452 void print_it87(const sensors_chip_name *name) 3461 3453 { 3462 char *label = NULL;3454 char *label; 3463 3455 double cur, min, max, fdiv, sens; 3464 3456 int alarms, valid; … … 3483 3475 } else 3484 3476 printf("ERROR: Can't get IN0 data!\n"); 3485 free _the_label(&label);3477 free(label); 3486 3478 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN1,&label,&valid) && 3487 3479 !sensors_get_feature(*name,SENSORS_IT87_IN1,&cur) && … … 3495 3487 } else 3496 3488 printf("ERROR: Can't get IN1 data!\n"); 3497 free _the_label(&label);3489 free(label); 3498 3490 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN2,&label,&valid) && 3499 3491 !sensors_get_feature(*name,SENSORS_IT87_IN2,&cur) && … … 3507 3499 } else 3508 3500 printf("ERROR: Can't get IN2 data!\n"); 3509 free _the_label(&label);3501 free(label); 3510 3502 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN3,&label,&valid) && 3511 3503 !sensors_get_feature(*name,SENSORS_IT87_IN3,&cur) && … … 3519 3511 } else 3520 3512 printf("ERROR: Can't get IN3 data!\n"); 3521 free _the_label(&label);3513 free(label); 3522 3514 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN4,&label,&valid) && 3523 3515 !sensors_get_feature(*name,SENSORS_IT87_IN4,&cur) && … … 3531 3523 } else 3532 3524 printf("ERROR: Can't get IN4 data!\n"); 3533 free _the_label(&label);3525 free(label); 3534 3526 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN5,&label,&valid) && 3535 3527 !sensors_get_feature(*name,SENSORS_IT87_IN5,&cur) && … … 3543 3535 } else 3544 3536 printf("ERROR: Can't get IN5 data!\n"); 3545 free _the_label(&label);3537 free(label); 3546 3538 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN6,&label,&valid) && 3547 3539 !sensors_get_feature(*name,SENSORS_IT87_IN6,&cur) && … … 3555 3547 } else 3556 3548 printf("ERROR: Can't get IN6 data!\n"); 3557 free _the_label(&label);3549 free(label); 3558 3550 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN7,&label,&valid) && 3559 3551 !sensors_get_feature(*name,SENSORS_IT87_IN7,&cur) && … … 3567 3559 } else 3568 3560 printf("ERROR: Can't get IN7 data!\n"); 3569 free _the_label(&label);3561 free(label); 3570 3562 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_IN8,&label,&valid) && 3571 3563 !sensors_get_feature(*name,SENSORS_IT87_IN8,&cur)) { … … 3576 3568 } else 3577 3569 printf("ERROR: Can't get IN8 data!\n"); 3578 free _the_label(&label);3570 free(label); 3579 3571 3580 3572 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_FAN1,&label,&valid) && … … 3589 3581 } else 3590 3582 printf("ERROR: Can't get FAN1 data!\n"); 3591 free _the_label(&label);3583 free(label); 3592 3584 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_FAN2,&label,&valid) && 3593 3585 !sensors_get_feature(*name,SENSORS_IT87_FAN2,&cur) && … … 3601 3593 } else 3602 3594 printf("ERROR: Can't get FAN2 data!\n"); 3603 free _the_label(&label);3595 free(label); 3604 3596 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_FAN3,&label,&valid) && 3605 3597 !sensors_get_feature(*name,SENSORS_IT87_FAN3,&cur) && … … 3613 3605 } else 3614 3606 printf("ERROR: Can't get FAN3 data!\n"); 3615 free _the_label(&label);3607 free(label); 3616 3608 3617 3609 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_TEMP1,&label,&valid) && … … 3630 3622 } else 3631 3623 printf("ERROR: Can't get TEMP1 data!\n"); 3632 free _the_label(&label);3624 free(label); 3633 3625 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_TEMP2,&label,&valid) && 3634 3626 !sensors_get_feature(*name,SENSORS_IT87_TEMP2,&cur) && … … 3646 3638 } else 3647 3639 printf("ERROR: Can't get TEMP2 data!\n"); 3648 free _the_label(&label);3640 free(label); 3649 3641 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_TEMP3,&label,&valid) && 3650 3642 !sensors_get_feature(*name,SENSORS_IT87_TEMP3,&cur) && … … 3662 3654 } else 3663 3655 printf("ERROR: Can't get TEMP3 data!\n"); 3664 free _the_label(&label);3656 free(label); 3665 3657 3666 3658 if (!sensors_get_label_and_valid(*name,SENSORS_IT87_VID,&label,&valid) && … … 3671 3663 } 3672 3664 } 3673 free _the_label(&label);3665 free(label); 3674 3666 } 3675 3667 3676 3668 void print_fscpos(const sensors_chip_name *name) 3677 3669 { 3678 char *label = NULL;3670 char *label; 3679 3671 double voltage, temp, state, fan; 3680 3672 int valid; … … 3692 3684 } else 3693 3685 printf("ERROR: Can't get TEMP1 data!\n"); 3694 free _the_label(&label);3686 free(label); 3695 3687 3696 3688 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_TEMP2,&label,&valid) && … … 3706 3698 } else 3707 3699 printf("ERROR: Can't get TEMP2 data!\n"); 3708 free _the_label(&label);3700 free(label); 3709 3701 3710 3702 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_TEMP3,&label,&valid) && … … 3720 3712 } else 3721 3713 printf("ERROR: Can't get TEMP3 data!\n"); 3722 free _the_label(&label);3714 free(label); 3723 3715 3724 3716 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_FAN1,&label,&valid) && … … 3734 3726 } else 3735 3727 printf("ERROR: Can't get FAN1 data!\n"); 3736 free _the_label(&label);3728 free(label); 3737 3729 3738 3730 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_FAN2,&label,&valid) && … … 3748 3740 } else 3749 3741 printf("ERROR: Can't get FAN2 data!\n"); 3750 free _the_label(&label);3742 free(label); 3751 3743 3752 3744 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_FAN3,&label,&valid) && … … 3762 3754 } else 3763 3755 printf("ERROR: Can't get FAN3 data!\n"); 3764 free _the_label(&label);3756 free(label); 3765 3757 3766 3758 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_VOLTAGE1,&label,&valid) && … … 3772 3764 } else 3773 3765 printf("ERROR: Can't get IN0 data!\n"); 3774 free _the_label(&label);3766 free(label); 3775 3767 3776 3768 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_VOLTAGE2,&label,&valid) && … … 3782 3774 } else 3783 3775 printf("ERROR: Can't get IN1 data!\n"); 3784 free _the_label(&label);3776 free(label); 3785 3777 3786 3778 if (!sensors_get_label_and_valid(*name,SENSORS_FSCPOS_VOLTAGE3,&label,&valid) && … … 3792 3784 } else 3793 3785 printf("ERROR: Can't get IN2 data!\n"); 3794 free _the_label(&label);3786 free(label); 3795 3787 } 3796 3788 3797 3789 void print_fscscy(const sensors_chip_name *name) 3798 3790 { 3799 char *label = NULL;3791 char *label; 3800 3792 double voltage, temp, tempmin, tempmax, templim, state, fan; 3801 3793 int valid; … … 3817 3809 } else 3818 3810 printf("ERROR: Can't get TEMP1 data!\n"); 3819 free _the_label(&label);3811 free(label); 3820 3812 3821 3813 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_TEMP2,&label,&valid) && … … 3835 3827 } else 3836 3828 printf("ERROR: Can't get TEMP2 data!\n"); 3837 free _the_label(&label);3829 free(label); 3838 3830 3839 3831 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_TEMP3,&label,&valid) && … … 3853 3845 } else 3854 3846 printf("ERROR: Can't get TEMP3 data!\n"); 3855 free _the_label(&label);3847 free(label); 3856 3848 3857 3849 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_TEMP4,&label,&valid) && … … 3871 3863 } else 3872 3864 printf("ERROR: Can't get TEMP4 data!\n"); 3873 free _the_label(&label);3865 free(label); 3874 3866 3875 3867 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_FAN1,&label,&valid) && … … 3885 3877 } else 3886 3878 printf("ERROR: Can't get FAN1 data!\n"); 3887 free _the_label(&label);3879 free(label); 3888 3880 3889 3881 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_FAN2,&label,&valid) && … … 3899 3891 } else 3900 3892 printf("ERROR: Can't get FAN2 data!\n"); 3901 free _the_label(&label);3893 free(label); 3902 3894 3903 3895 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_FAN3,&label,&valid) && … … 3913 3905 } else 3914 3906 printf("ERROR: Can't get FAN3 data!\n"); 3915 free _the_label(&label);3907 free(label); 3916 3908 3917 3909 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_FAN4,&label,&valid) && … … 3927 3919 } else 3928 3920 printf("ERROR: Can't get FAN4 data!\n"); 3929 free _the_label(&label);3921 free(label); 3930 3922 3931 3923 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_FAN5,&label,&valid) && … … 3941 3933 } else 3942 3934 printf("ERROR: Can't get FAN5 data!\n"); 3943 free _the_label(&label);3935 free(label); 3944 3936 3945 3937 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_FAN6,&label,&valid) && … … 3955 3947 } else 3956 3948 printf("ERROR: Can't get FAN6 data!\n"); 3957 free _the_label(&label);3949 free(label); 3958 3950 3959 3951 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_VOLTAGE1,&label,&valid) && … … 3965 3957 } else 3966 3958 printf("ERROR: Can't get IN0 data!\n"); 3967 free _the_label(&label);3959 free(label); 3968 3960 3969 3961 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_VOLTAGE2,&label,&valid) && … … 3975 3967 } else 3976 3968 printf("ERROR: Can't get IN1 data!\n"); 3977 free _the_label(&label);3969 free(label); 3978 3970 3979 3971 if (!sensors_get_label_and_valid(*name,SENSORS_FSCSCY_VOLTAGE3,&label,&valid) && … … 3985 3977 } else 3986 3978 printf("ERROR: Can't get IN2 data!\n"); 3987 free _the_label(&label);3979 free(label); 3988 3980 } 3989 3981 3990 3982 void print_fscher(const sensors_chip_name *name) 3991 3983 { 3992 char *label = NULL;3984 char *label; 3993 3985 double voltage, temp, state, fan; 3994 3986 int valid; … … 4006 3998 } else 4007 3999 printf("ERROR: Can't get TEMP1 data!\n"); 4008 free _the_label(&label);4000 free(label); 4009 4001 4010 4002 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_TEMP2,&label,&valid) … … 4020 4012 } else 4021 4013 printf("ERROR: Can't get TEMP2 data!\n"); 4022 free _the_label(&label);4014 free(label); 4023 4015 4024 4016 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_TEMP3,&label,&valid) … … 4034 4026 } else 4035 4027 printf("ERROR: Can't get TEMP3 data!\n"); 4036 free _the_label(&label);4028 free(label); 4037 4029 4038 4030 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_FAN1,&label,&valid) … … 4048 4040 } else 4049 4041 printf("ERROR: Can't get FAN1 data!\n"); 4050 free _the_label(&label);4042 free(label); 4051 4043 4052 4044 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_FAN2,&label,&valid) … … 4062 4054 } else 4063 4055 printf("ERROR: Can't get FAN2 data!\n"); 4064 free _the_label(&label);4056 free(label); 4065 4057 4066 4058 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_FAN3,&label,&valid) … … 4076 4068 } else 4077 4069 printf("ERROR: Can't get FAN3 data!\n"); 4078 free _the_label(&label);4070 free(label); 4079 4071 4080 4072 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_VOLTAGE1,&label,&valid) … … 4086 4078 } else 4087 4079 printf("ERROR: Can't get IN0 data!\n"); 4088 free _the_label(&label);4080 free(label); 4089 4081 4090 4082 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_VOLTAGE2,&label,&valid) … … 4096 4088 } else 4097 4089 printf("ERROR: Can't get IN1 data!\n"); 4098 free _the_label(&label);4090 free(label); 4099 4091 4100 4092 if (!sensors_get_label_and_valid(*name,SENSORS_FSCHER_VOLTAGE3,&label,&valid) … … 4106 4098 } else 4107 4099 printf("ERROR: Can't get IN2 data!\n"); 4108 free _the_label(&label);4100 free(label); 4109 4101 } 4110 4102 … … 4136 4128 } 4137 4129 /* display no error, 2.6 driver doesn't have that file */ 4138 free _the_label(&label);4130 free(label); 4139 4131 4140 4132 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_CH0,&label,&valid) && … … 4146 4138 } 4147 4139 else printf("ERROR: Can't read ch0!\n"); 4148 free _the_label(&label);4140 free(label); 4149 4141 4150 4142 if (!sensors_get_label_and_valid(*name,SENSORS_PCF8591_CH1,&label,&valid) && … … 4156 4148 } 4157 4149 else printf("ERROR: Can't read ch1!\n"); 4158 free _the_label(&label);4150 free(label); 4159 4151 4160 4152 if (ain_conf != 3) { … … 4168 4160 else if (ain_conf >= 0) /* hide error for 2.6 kernel driver */ 4169 4161 printf("ERROR: Can't read ch2!\n"); 4170 free _the_label(&label);4162 free(label); 4171 4163 } 4172 4164 … … 4181 4173 else if (ain_conf >= 0) /* hide error for 2.6 kernel driver */ 4182 4174 printf("ERROR: Can't read ch3!\n"); 4183 free _the_label(&label);4175 free(label); 4184 4176 } 4185 4177 … … 4193 4185 } 4194 4186 else printf("ERROR: Can't read aout!\n"); 4195 free _the_label(&label);4187 free(label); 4196 4188 4197 4189 } … … 4199 4191 void print_vt1211(const sensors_chip_name *name) 4200 4192 { 4201 char *label = NULL;4193 char *label; 4202 4194 double cur,min,max,fdiv; 4203 4195 int alarms,valid; … … 4226 4218 printf("ERROR: Can't get IN0 data!\n"); 4227 4219 } 4228 free _the_label(&label);4220 free(label); 4229 4221 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_IN1,&label,&valid)) { 4230 4222 printf("ERROR: Can't get IN1 config!\n"); … … 4239 4231 printf("ERROR: Can't get IN1 data!\n"); 4240 4232 } 4241 free _the_label(&label);4233 free(label); 4242 4234 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_IN2,&label,&valid)) { 4243 4235 printf("ERROR: Can't get IN2 config!\n"); … … 4252 4244 printf("ERROR: Can't get IN2 data!\n"); 4253 4245 } 4254 free _the_label(&label);4246 free(label); 4255 4247 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_IN3,&label,&valid)) { 4256 4248 printf("ERROR: Can't get IN3 config!\n"); … … 4265 4257 printf("ERROR: Can't get IN3 data!\n"); 4266 4258 } 4267 free _the_label(&label);4259 free(label); 4268 4260 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_IN4,&label,&valid)) { 4269 4261 printf("ERROR: Can't get IN4 config!\n"); … … 4278 4270 printf("ERROR: Can't get IN4 data!\n"); 4279 4271 } 4280 free _the_label(&label);4272 free(label); 4281 4273 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_IN5,&label,&valid)) { 4282 4274 printf("ERROR: Can't get IN5 config!\n"); … … 4291 4283 printf("ERROR: Can't get IN5 data!\n"); 4292 4284 } 4293 free _the_label(&label);4285 free(label); 4294 4286 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_FAN1,&label,&valid)) { 4295 4287 printf("ERROR: Can't get FAN1 config!\n"); … … 4304 4296 printf("ERROR: Can't get FAN1 data!\n"); 4305 4297 } 4306 free _the_label(&label);4298 free(label); 4307 4299 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_FAN2,&label,&valid)) { 4308 4300 printf("ERROR: Can't get FAN2 config!\n"); … … 4317 4309 printf("ERROR: Can't get FAN2 data!\n"); 4318 4310 } 4319 free _the_label(&label);4311 free(label); 4320 4312 4321 4313 /* no temp 1 */ … … 4332 4324 printf("ERROR: Can't get TEMP2 data!\n"); 4333 4325 } 4334 free _the_label(&label);4326 free(label); 4335 4327 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP3,&label,&valid)) { 4336 4328 printf("ERROR: Can't get TEMP3 config!\n"); … … 4345 4337 printf("ERROR: Can't get TEMP3 data!\n"); 4346 4338 } 4347 free _the_label(&label);4339 free(label); 4348 4340 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP4,&label,&valid)) { 4349 4341 printf("ERROR: Can't get TEMP4 config!\n"); … … 4358 4350 printf("ERROR: Can't get TEMP4 data!\n"); 4359 4351 } 4360 free _the_label(&label);4352 free(label); 4361 4353 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP5,&label,&valid)) { 4362 4354 printf("ERROR: Can't get TEMP5 config!\n"); … … 4371 4363 printf("ERROR: Can't get TEMP5 data!\n"); 4372 4364 } 4373 free _the_label(&label);4365 free(label); 4374 4366 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP6,&label,&valid)) { 4375 4367 printf("ERROR: Can't get TEMP6 config!\n"); … … 4384 4376 printf("ERROR: Can't get TEMP6 data!\n"); 4385 4377 } 4386 free _the_label(&label);4378 free(label); 4387 4379 if (sensors_get_label_and_valid(*name,SENSORS_VT1211_TEMP7,&label,&valid)) { 4388 4380 printf("ERROR: Can't get TEMP7 config!\n"); … … 4397 4389 printf("ERROR: Can't get TEMP7 data!\n"); 4398 4390 } 4399 free _the_label(&label);4391 free(label); 4400 4392 4401 4393 print_vid_info(name, SENSORS_VT1211_VID, SENSORS_VT1211_VRM); … … 4404 4396 void print_smsc47m1(const sensors_chip_name *name) 4405 4397 { 4406 char *label = NULL;4398 char *label; 4407 4399 double cur, min, div; 4408 4400 int alarms, valid, i; … … 4430 4422 may be missing without it being considered an error; thus we don't 4431 4423 print any error if this happens. */ 4432 free _the_label(&label);4424 free(label); 4433 4425 } 4434 4426 } … … 4436 4428 void print_pc87360(const sensors_chip_name *name) 4437 4429 { 4438 char *label = NULL;4430 char *label; 4439 4431 double cur, min, fdiv, tmp; 4440 4432 int status, valid; … … 4454 4446 } 4455 4447 } 4456 free _the_label(&label);4448 free(label); 4457 4449 4458 4450 if (!sensors_get_label_and_valid(*name, SENSORS_PC87360_FAN2, &label, &valid) … … 4470 4462 } 4471 4463 } 4472 free _the_label(&label);4464 free(label); 4473 4465 } 4474 4466 4475 4467 void print_pc87364(const sensors_chip_name *name) 4476 4468 { 4477 char *label = NULL;4469 char *label; 4478 4470 double cur, min, fdiv, tmp; 4479 4471 int status, valid; … … 4495 4487 } 4496 4488 } 4497 free _the_label(&label);4489 free(label); 4498 4490 } 4499 4491 4500 4492 void print_pc87366(const sensors_chip_name *name) 4501 4493 { 4502 char *label = NULL;4494 char *label; 4503 4495 double cur, min, max; 4504 4496 int status, valid, i, tempnr = 2; … … 4525 4517 } else 4526 4518 printf("ERROR: Can't get IN%d data!\n", i); 4527 free _the_label(&label);4519 free(label); 4528 4520 } 4529 4521 … … 4556 4548 } else 4557 4549 printf("ERROR: Can't get TEMP%d data!\n", i + 1); 4558 free _the_label(&label);4550 free(label); 4559 4551 4560 4552 if (!sensors_get_label_and_valid(*name, SENSORS_PC87360_TEMP1_CRIT + i, &label, &valid) … … 4569 4561 } else 4570 4562 printf("ERROR: Can't get TEMP%d overtemperature data!\n", i + 1); 4571 free _the_label(&label);4563 free(label); 4572 4564 } 4573 4565 … … 4595 4587 void print_lm92 (const sensors_chip_name *name) 4596 4588 { 4597 char *label = NULL;4589 char *label; 4598 4590 double temp[5]; 4599 4591 int valid,alarms; … … 4633 4625 } else printf ("ERROR: Can't get temperature data!\n"); 4634 4626 4635 free _the_label (&label);4627 free(label); 4636 4628 } 4637 4629 4638 4630 void print_vt8231(const sensors_chip_name *name) 4639 4631 { 4640 char *label = NULL;4632 char *label; 4641 4633 double cur,min,max,fdiv; 4642 4634 int alarms,valid; … … 4660 4652 } else 4661 4653 printf("ERROR: Can't get IN0 data!\n"); 4662 free _the_label(&label);4654 free(label); 4663 4655 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_IN1,&label,&valid) && 4664 4656 !sensors_get_feature(*name,SENSORS_VT8231_IN1,&cur) && … … 4672 4664 } else 4673 4665 printf("ERROR: Can't get IN1 data!\n"); 4674 free _the_label(&label);4666 free(label); 4675 4667 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_IN2,&label,&valid) && 4676 4668 !sensors_get_feature(*name,SENSORS_VT8231_IN2,&cur) && … … 4684 4676 } else 4685 4677 printf("ERROR: Can't get IN2 data!\n"); 4686 free _the_label(&label);4678 free(label); 4687 4679 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_IN3,&label,&valid) && 4688 4680 !sensors_get_feature(*name,SENSORS_VT8231_IN3,&cur) && … … 4696 4688 } else 4697 4689 printf("ERROR: Can't get IN3 data!\n"); 4698 free _the_label(&label);4690 free(label); 4699 4691 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_IN4,&label,&valid) && 4700 4692 !sensors_get_feature(*name,SENSORS_VT8231_IN4,&cur) && … … 4708 4700 } else 4709 4701 printf("ERROR: Can't get IN4 data!\n"); 4710 free _the_label(&label);4702 free(label); 4711 4703 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_IN5,&label,&valid) && 4712 4704 !sensors_get_feature(*name,SENSORS_VT8231_IN5,&cur) && … … 4720 4712 } else 4721 4713 printf("ERROR: Can't get IN5 data!\n"); 4722 free _the_label(&label);4714 free(label); 4723 4715 4724 4716 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_FAN1,&label,&valid) && … … 4733 4725 } else 4734 4726 printf("ERROR: Can't get FAN1 data!\n"); 4735 free _the_label(&label);4727 free(label); 4736 4728 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_FAN2,&label,&valid) && 4737 4729 !sensors_get_feature(*name,SENSORS_VT8231_FAN2,&cur) && … … 4745 4737 } else 4746 4738 printf("ERROR: Can't get FAN2 data!\n"); 4747 free _the_label(&label);4739 free(label); 4748 4740 4749 4741 /* no temp 1 */ … … 4759 4751 } else 4760 4752 printf("ERROR: Can't get TEMP2 data!\n"); 4761 free _the_label(&label);4753 free(label); 4762 4754 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_TEMP3,&label,&valid) && 4763 4755 !sensors_get_feature(*name,SENSORS_VT8231_TEMP3,&cur) && … … 4771 4763 } else 4772 4764 printf("ERROR: Can't get TEMP3 data!\n"); 4773 free _the_label(&label);4765 free(label); 4774 4766 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_TEMP4,&label,&valid) && 4775 4767 !sensors_get_feature(*name,SENSORS_VT8231_TEMP4,&cur) && … … 4783 4775 } else 4784 4776 printf("ERROR: Can't get TEMP4 data!\n"); 4785 free _the_label(&label);4777 free(label); 4786 4778 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_TEMP5,&label,&valid) && 4787 4779 !sensors_get_feature(*name,SENSORS_VT8231_TEMP5,&cur) && … … 4795 4787 } else 4796 4788 printf("ERROR: Can't get TEMP5 data!\n"); 4797 free _the_label(&label);4789 free(label); 4798 4790 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_TEMP6,&label,&valid) && 4799 4791 !sensors_get_feature(*name,SENSORS_VT8231_TEMP6,&cur) && … … 4807 4799 } else 4808 4800 printf("ERROR: Can't get TEMP6 data!\n"); 4809 free _the_label(&label);4801 free(label); 4810 4802 if (!sensors_get_label_and_valid(*name,SENSORS_VT8231_TEMP7,&label,&valid) && 4811 4803 !sensors_get_feature(*name,SENSORS_VT8231_TEMP7,&cur) && … … 4819 4811 } else 4820 4812 printf("ERROR: Can't get TEMP7 data!\n"); 4821 free _the_label(&label);4813 free(label); 4822 4814 4823 4815 print_vid_info(name, SENSORS_VT8231_VID, SENSORS_VT8231_VRM); … … 4830 4822 void print_bmc(const sensors_chip_name *name) 4831 4823 { 4832 char *label = NULL;4824 char *label; 4833 4825 double cur,min,max; 4834 4826 int alarms, valid, i; … … 4858 4850 } 4859 4851 } 4860 free _the_label(&label);4852 free(label); 4861 4853 } 4862 4854 … … 4871 4863 } 4872 4864 } 4873 free _the_label(&label);4865 free(label); 4874 4866 } 4875 4867 … … 4885 4877 } 4886 4878 } 4887 free _the_label(&label);4879 free(label); 4888 4880 } 4889 4881 } … … 4903 4895 void print_adm1026(const sensors_chip_name *name) 4904 4896 { 4905 char *label = NULL;4897 char *label; 4906 4898 double cur,min,max; 4907 4899 long alarms; … … 4931 4923 printf("ERROR: Can't get IN%d data!\n",i); 4932 4924 } 4933 free _the_label(&label);4925 free(label); 4934 4926 }; 4935 4927 … … 4950 4942 printf("ERROR: Can't get FAN%d data!\n",i); 4951 4943 } 4952 free _the_label(&label);4944 free(label); 4953 4945 }; 4954 4946 … … 4979 4971 printf("ERROR: Can't get TEMP%d data!\n",i+1); 4980 4972 } 4981 free _the_label(&label);4973 free(label); 4982 4974 }; 4983 4975 … … 5016 5008 } else 5017 5009 printf("ERROR: Can't get local temperature data!\n"); 5018 free _the_label(&label);5010 free(label); 5019 5011 5020 5012 if (!sensors_get_label_and_valid(*name,SENSORS_LM83_REMOTE1_TEMP,&label,&valid) && … … 5031 5023 } else 5032 5024 printf("ERROR: Can't get remote temperature 1 data!\n"); 5033 free _the_label(&label);5025 free(label); 5034 5026 5035 5027 if (!sensors_get_label_and_valid(*name,SENSORS_LM83_REMOTE2_TEMP,&label,&valid) && … … 5046 5038 } else 5047 5039 printf("ERROR: Can't get remote temperature 2 data!\n"); 5048 free _the_label(&label);5040 free(label); 5049 5041 5050 5042 if (!sensors_get_label_and_valid(*name,SENSORS_LM83_REMOTE3_TEMP,&label,&valid) && … … 5061 5053 } else 5062 5054 printf("ERROR: Can't get remote temperature 3 data!\n"); 5063 free _the_label(&label);5055 free(label); 5064 5056 } 5065 5057 … … 5091 5083 } else 5092 5084 printf("ERROR: Can't get local temperature data!\n"); 5093 free _the_label(&label);5085 free(label); 5094 5086 5095 5087 if (!sensors_get_label_and_valid(*name, SENSORS_LM90_REMOTE_TEMP, … … 5108 5100 } else 5109 5101 printf("ERROR: Can't get remote temperature data!\n"); 5110 free _the_label(&label);5102 free(label); 5111 5103 5112 5104 if (!sensors_get_label_and_valid(*name, SENSORS_LM90_LOCAL_TCRIT, … … 5121 5113 } else 5122 5114 printf("ERROR: Can't get local tcrit data!\n"); 5123 free _the_label(&label);5115 free(label); 5124 5116 5125 5117 if (!sensors_get_label_and_valid(*name, SENSORS_LM90_REMOTE_TCRIT, … … 5134 5126 } else 5135 5127 printf("ERROR: Can't get remote tcrit data!\n"); 5136 free _the_label(&label);5128 free(label); 5137 5129 } 5138 5130 … … 5162 5154 } else 5163 5155 printf("ERROR: Can't get local temperature data!\n"); 5164 free _the_label(&label);5156 free(label); 5165 5157 5166 5158 if (!sensors_get_label_and_valid(*name, SENSORS_LM63_REMOTE_TEMP, … … 5179 5171 } else 5180 5172 printf("ERROR: Can't get remote temperature data!\n"); 5181 free _the_label(&label);5173 free(label); 5182 5174 5183 5175 if (!sensors_get_label_and_valid(*name, SENSORS_LM63_REMOTE_TCRIT, … … 5192 5184 } else 5193 5185 printf("ERROR: Can't get remote tcrit data!\n"); 5194 free _the_label(&label);5186 free(label); 5195 5187 5196 5188 if (!sensors_get_label_and_valid(*name, SENSORS_LM63_FAN, … … 5206 5198 /* No error if fan files are missing as it will happen with 2.6 5207 5199 kernels when the tachometer pin is used as an alarm output. */ 5208 free _the_label(&label);5200 free(label); 5209 5201 } 5210 5202 … … 5238 5230 } else 5239 5231 printf("ERROR: Can't get fan%d data!\n", i+1); 5240 free _the_label(&label);5232 free(label); 5241 5233 } 5242 5234 … … 5255 5247 } else 5256 5248 printf("ERROR: Can't get temp1 temperature data!\n"); 5257 free _the_label(&label);5249 free(label); 5258 5250 if (!sensors_get_label_and_valid(*name, SENSORS_ADM1031_TEMP1_CRIT, 5259 5251 &label, &valid) … … 5267 5259 } else 5268 5260 printf("ERROR: Can't get temp1 temperature data!\n"); 5269 free _the_label(&label);5261 free(label); 5270 5262 5271 5263 for (i=0; i < (is_1031 ? 2 : 1); i++) { … … 5285 5277 } else 5286 5278 printf("ERROR: Can't get temp%d temperature data!\n", i+2); 5287 free _the_label(&label);5279 free(label); 5288 5280 if (!sensors_get_label_and_valid(*name, SENSORS_ADM1031_TEMP2_CRIT+i*10, 5289 5281 &label, &valid) … … 5297 5289 } else 5298 5290 printf("ERROR: Can't get temp%d crit temperature data!\n", i+2); 5299 free _the_label(&label);5291 free(label); 5300 5292 } 5301 5293 } … … 5342 5334 } else 5343 5335 printf("ERROR: Can't get temperature data!\n"); 5344 free _the_label(&label);5336 free(label); 5345 5337 } 5346 5338 … … 5369 5361 } else 5370 5362 printf("ERROR: Can't get local temperature data!\n"); 5371 free _the_label(&label);5363 free(label); 5372 5364 5373 5365 if (!sensors_get_label_and_valid(*name, SENSORS_MAX1619_REMOTE_TEMP, … … 5385 5377 } else 5386 5378 printf("ERROR: Can't get remote temperature data!\n"); 5387 free _the_label(&label);5379 free(label); 5388 5380 5389 5381 if (!sensors_get_label_and_valid(*name, SENSORS_MAX1619_REMOTE_MAX, … … 5398 5390 } else 5399 5391 printf("ERROR: Can't get remote temperature max data!\n"); 5400 free _the_label(&label);5392 free(label); 5401 5393 } 5402 5394 5403 5395 void print_max6650(const sensors_chip_name *name) 5404 5396 { 5405 char *label = NULL;5397 char *label; 5406 5398 double tach, speed; 5407 5399 int valid, i; … … 5431 5423 } else 5432 5424 printf("ERROR: Can't get %s data!\n", tach_list[0].name); 5433 free _the_label(&label);5425 free(label); 5434 5426 5435 5427 /* Just display the measured speed for the other three, uncontrolled fans */ … … 5446 5438 printf("ERROR: Can't get %s data!\n", tach_list[i].name); 5447 5439 5448 free _the_label(&label);5440 free(label); 5449 5441 } 5450 5442 } … … 5456 5448 int in, int in_min, int in_max) 5457 5449 { 5458 char *label = NULL;5450 char *label; 5459 5451 double cur, min, max; 5460 5452 int valid; … … 5471 5463 } else 5472 5464 printf("ERROR: Can't get IN data! (0x%04x)\n", in); 5473 free _the_label(&label);5465 free(label); 5474 5466 } 5475 5467 … … 5486 5478 int fan, int fan_div, int fan_min) 5487 5479 { 5488 char *label = NULL;5480 char *label; 5489 5481 double cur, div, min; 5490 5482 int valid; … … 5501 5493 } else 5502 5494 printf("ERROR: Can't get FAN data! (0x%04x)\n", fan); 5503 free _the_label(&label);5495 free(label); 5504 5496 } 5505 5497 … … 5516 5508 int temp, int temp_max, int temp_hyst) 5517 5509 { 5518 char *label = NULL;5510 char *label; 5519 5511 double cur, max, hyst; 5520 5512 int valid; … … 5536 5528 printf("ERROR: Can't get TEMP data! (0x%04x)\n", temp); 5537 5529 5538 free _the_label(&label);5530 free(label); 5539 5531 } 5540 5532 … … 5552 5544 void print_asb100(const sensors_chip_name *name) 5553 5545 { 5554 char *label = NULL;5546 char *label; 5555 5547 double cur; 5556 5548 int valid, alarms = 0; … … 5587 5579 printf("\n"); 5588 5580 } 5589 free _the_label(&label);5581 free(label); 5590 5582 5591 5583 } … … 5604 5596 int fan, int fan_min) 5605 5597 { 5606 char *label = NULL;5598 char *label; 5607 5599 double cur, min; 5608 5600 int valid; … … 5618 5610 } else 5619 5611 printf("ERROR: Can't get FAN data! (0x%04x)\n", fan); 5620 free _the_label(&label);5612 free(label); 5621 5613 } 5622 5614 … … 5632 5624 int temp, int temp_min, int temp_max) 5633 5625 { 5634 char *label = NULL;5626 char *label; 5635 5627 double cur, min, max; 5636 5628 int valid; … … 5648 5640 printf("ERROR: Can't get TEMP data! (0x%04x)\n", temp); 5649 5641 5650 free _the_label(&label);5642 free(label); 5651 5643 } 5652 5644 … … 5662 5654 static void print_lm93_vid(const sensors_chip_name *name, int vid) 5663 5655 { 5664 char *label = NULL;5656 char *label; 5665 5657 double cur; 5666 5658 int valid; … … 5675 5667 printf("ERROR: Can't get VID data! (0x%04x)\n", vid); 5676 5668 } 5677 free _the_label(&label);5669 free(label); 5678 5670 } 5679 5671 … … 5723 5715 static void print_smsc47b397_temp(const sensors_chip_name *name, int temp) 5724 5716 { 5725 char *label = NULL;5717 char *label; 5726 5718 double cur; 5727 5719 int valid; … … 5737 5729 printf("ERROR: Can't get TEMP data! (0x%04x)\n", temp); 5738 5730 5739 free _the_label(&label);5731 free(label); 5740 5732 } 5741 5733 … … 5748 5740 static void print_smsc47b397_fan(const sensors_chip_name *name, int fan) 5749 5741 { 5750 char *label = NULL;5742 char *label; 5751 5743 double cur; 5752 5744 int valid; … … 5760 5752 } else 5761 5753 printf("ERROR: Can't get FAN data! (0x%04x)\n", fan); 5762 free _the_label(&label);5754 free(label); 5763 5755 } 5764 5756
