projects
/
psensor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed restoration of the panel divider position.
[psensor.git]
/
src
/
lib
/
slog.c
diff --git
a/src/lib/slog.c
b/src/lib/slog.c
index
7174ba4
..
d6c4bc2
100644
(file)
--- a/
src/lib/slog.c
+++ b/
src/lib/slog.c
@@
-58,15
+58,14
@@
static char *time_to_str(time_t *t)
str = malloc(64);
str = malloc(64);
- if (strftime(str, 64, "%s", <))
{
+ if (strftime(str, 64, "%s", <))
return str;
return str;
- } else {
- free(str);
- return NULL;
- }
+
+ free(str);
+ return NULL;
}
}
-static char *get_default_path()
+static char *get_default_path(
void
)
{
char *home, *path, *dir;
{
char *home, *path, *dir;
@@
-83,10
+82,10
@@
static char *get_default_path()
free(dir);
return path;
free(dir);
return path;
- } else {
- log_warn(_("HOME variable not set."));
- return strdup(DEFAULT_FILENAME);
}
}
+
+ log_warn(_("HOME variable not set."));
+ return strdup(DEFAULT_FILENAME);
}
static bool slog_open(const char *path, struct psensor **sensors)
}
static bool slog_open(const char *path, struct psensor **sensors)
@@
-134,8
+133,8
@@
static void slog_write_sensors(struct psensor **sensors)
bool first_call;
if (!file) {
bool first_call;
if (!file) {
- log_
err
(_("Sensor log file not open."));
- return
;
+ log_
debug
(_("Sensor log file not open."));
+ return;
}
gettimeofday(&tv, NULL);
}
gettimeofday(&tv, NULL);
@@
-177,10
+176,10
@@
static void *slog_routine(void *data)
sleep(period);
}
sleep(period);
}
- pthread_exit(
0
);
+ pthread_exit(
NULL
);
}
}
-void slog_close()
+void slog_close(
void
)
{
if (file) {
pthread_cancel(thread);
{
if (file) {
pthread_cancel(thread);