From 24ee53d80e5befc284620367c2c89308f197aa0f Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 5 Mar 2008 07:44:16 +0000 Subject: [PATCH] Use __func__ instead of __FUNCTION__. The former is standard, the latter is not. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5134 7894878c-1315-0410-8ee3-d5d059ff63e0 --- CHANGES | 1 + lib/sysfs.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 0fcbf826..af3dab93 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ lm-sensors CHANGES file ----------------------- SVN-HEAD + libsensors: Use __func__ instead of __FUNCTION__ sensors-detect: Add SMSC SCH5027D detection Do not access I/O ports on PPC Move south bridge sensor detection to the right section diff --git a/lib/sysfs.c b/lib/sysfs.c index c466d5e1..2a6bce0b 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -1,7 +1,7 @@ /* sysfs.c - Part of libsensors, a library for reading Linux sensor data Copyright (c) 2005 Mark M. Hoffman - Copyright (C) 2007 Jean Delvare + Copyright (C) 2007-2008 Jean Delvare This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -63,7 +63,7 @@ static char *sysfs_read_attr(const char *device, const char *attr) /* Last byte is a '\n'; chop that off */ p = strndup(buf, strlen(buf) - 1); if (!p) - sensors_fatal_error(__FUNCTION__, "out of memory"); + sensors_fatal_error(__func__, "Out of memory"); return p; } @@ -311,7 +311,7 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip, all_subfeatures = calloc(ALL_POSSIBLE_SUBFEATURES, sizeof(sensors_subfeature)); if (!all_subfeatures) - sensors_fatal_error(__FUNCTION__, "Out of memory"); + sensors_fatal_error(__func__, "Out of memory"); while ((ent = readdir(dir))) { char *name = ent->d_name; @@ -336,7 +336,7 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip, /* More sensors of one type than MAX_SENSORS_PER_TYPE, we have to ignore it */ #ifdef DEBUG - sensors_fatal_error(__FUNCTION__, + sensors_fatal_error(__func__, "Increase MAX_SENSORS_PER_TYPE!"); #endif continue; @@ -361,8 +361,7 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip, if (all_subfeatures[i].name) { #ifdef DEBUG - sensors_fatal_error(__FUNCTION__, - "Duplicate subfeature"); + sensors_fatal_error(__func__, "Duplicate subfeature"); #endif continue; } @@ -399,7 +398,7 @@ static int sensors_read_dynamic_chip(sensors_chip_features *chip, dyn_subfeatures = calloc(sfnum, sizeof(sensors_subfeature)); dyn_features = calloc(fnum, sizeof(sensors_feature)); if (!dyn_subfeatures || !dyn_features) - sensors_fatal_error(__FUNCTION__, "Out of memory"); + sensors_fatal_error(__func__, "Out of memory"); /* Copy from the sparse array to the compact array */ sfnum = 0; @@ -474,7 +473,7 @@ static int sensors_read_one_sysfs_chip(const char *dev_path, entry.chip.path = strdup(hwmon_path); if (!entry.chip.path) - sensors_fatal_error(__FUNCTION__, "out of memory"); + sensors_fatal_error(__func__, "Out of memory"); /* Find bus type */ snprintf(linkpath, NAME_MAX, "%s/subsystem", dev_path);