aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2007-01-03 15:00:39 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2007-01-03 15:00:39 +0000
commit889509323b1372b76ce4ab38828c4bcaa3571d75 (patch)
tree3496df84d9a9f79f5a7d32a81ccbd0b1f9282000
parentf89d3c299263e08975255614285f5160eef3a9a4 (diff)
Cleanups.
-rw-r--r--hardinfo2/computer.c4
-rwxr-xr-xhardinfo2/configure2
-rw-r--r--hardinfo2/devices.c4
-rw-r--r--hardinfo2/util.c4
4 files changed, 6 insertions, 8 deletions
diff --git a/hardinfo2/computer.c b/hardinfo2/computer.c
index 7a50f8cc..2d82cd50 100644
--- a/hardinfo2/computer.c
+++ b/hardinfo2/computer.c
@@ -122,8 +122,8 @@ hi_get_field(gchar * field)
} else if (g_str_equal(field, "Date/Time")) {
time_t t = time(NULL);
- tmp = g_new0(gchar, 32);
- strftime(tmp, 32, "%D / %R", localtime(&t));
+ tmp = g_new0(gchar, 64);
+ strftime(tmp, 64, "%c", localtime(&t));
} else if (g_str_equal(field, "Load Average")) {
tmp = computer_get_formatted_loadavg();
} else {
diff --git a/hardinfo2/configure b/hardinfo2/configure
index 068d99cc..449ee2e8 100755
--- a/hardinfo2/configure
+++ b/hardinfo2/configure
@@ -166,7 +166,7 @@ echo "#define LIBPREFIX \"/usr/lib/hardinfo/\"" >> config.h
if [ "$RELEASE" == "1" ]; then
echo "#define DEBUG(...)" >> config.h
else
- echo '#define DEBUG(msg,...) g_print("*** %s:%d (%s) *** " msg "\n", \' >> config.h
+ echo '#define DEBUG(msg,...) fprintf(stderr, "*** %s:%d (%s) *** " msg "\n", \' >> config.h
echo ' __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__)' >> config.h
fi
diff --git a/hardinfo2/devices.c b/hardinfo2/devices.c
index d052722d..d44e5222 100644
--- a/hardinfo2/devices.c
+++ b/hardinfo2/devices.c
@@ -141,9 +141,7 @@ get_processor_name(void)
gchar *
get_storage_devices(void)
{
- if (!*storage_list) {
- scan_storage(FALSE);
- }
+ scan_storage(FALSE);
return storage_list;
}
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index 3af626c7..96dfbbc7 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -805,8 +805,8 @@ void tree_view_save_image(gchar *filename)
static gboolean __idle_free_do(gpointer ptr)
{
- DEBUG("Collecting Garbage: %p", ptr);
- DEBUG(" Data: %20s", (gchar*)ptr);
+ DEBUG("GC memory at %p: %s", ptr,
+ g_utf8_validate((gchar*)ptr, 3, NULL) ? (gchar*)ptr : "[non string data]");
g_free(ptr);