mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-04 00:05:10 +00:00
Move degrees string construction into a single, common place.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2252 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -54,6 +54,8 @@ sensors_chip_name chips[CHIPS_MAX];
|
||||
int chips_count=0;
|
||||
int do_sets, do_unknown, fahrenheit, show_algorithm, hide_adapter, hide_unknown;
|
||||
|
||||
char degstr[5]; /* store the correct string to print degrees */
|
||||
|
||||
void print_short_help(void)
|
||||
{
|
||||
printf("Try `%s -h' for more information\n",PROGRAM);
|
||||
@@ -245,6 +247,14 @@ int main (int argc, char *argv[])
|
||||
|
||||
close_config_file();
|
||||
|
||||
/* build the degrees string */
|
||||
sprintf(degstr, "%c", 176);
|
||||
if (fahrenheit) {
|
||||
strcat(degstr, "F");
|
||||
} else {
|
||||
strcat(degstr, "C");
|
||||
}
|
||||
|
||||
if(do_the_real_work(&error)) {
|
||||
sensors_cleanup();
|
||||
exit(error);
|
||||
|
Reference in New Issue
Block a user