mirror of
https://github.com/javalsai/lidm.git
synced 2025-09-05 04:28:00 +02:00
fix: format and linter errors
This commit is contained in:
@@ -243,7 +243,7 @@ int parse_config(struct config* NNULLABLE config, char* NNULLABLE path) {
|
|||||||
if (fd == NULL) {
|
if (fd == NULL) {
|
||||||
log_perror("fopen");
|
log_perror("fopen");
|
||||||
log_printf(" [I] No config, place one at " LIDM_CONF_PATH
|
log_printf(" [I] No config, place one at " LIDM_CONF_PATH
|
||||||
" or set the LIDM_CONF env variable");
|
" or set the LIDM_CONF env variable\n");
|
||||||
return 0; // Its fine now anyways
|
return 0; // Its fine now anyways
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@ void log_perror(const char* s) {
|
|||||||
if (!logger_out) return;
|
if (!logger_out) return;
|
||||||
|
|
||||||
if (s)
|
if (s)
|
||||||
(void)fprintf(logger_out, "%s: %s", s, strerror(errno));
|
(void)fprintf(logger_out, "%s: %s\n", s, strerror(errno));
|
||||||
else
|
else
|
||||||
(void)fprintf(logger_out, "%s", strerror(errno));
|
(void)fprintf(logger_out, "%s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
|
2
src/ui.c
2
src/ui.c
@@ -121,7 +121,7 @@ char* trunc_gethostname(const size_t MAXLEN, const char* const ELLIPSIS) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (utf8len(buf) > MAXLEN) {
|
if (utf8len(buf) > MAXLEN) {
|
||||||
int end = utf8trunc(buf, MAXLEN - utf8len(ELLIPSIS));
|
size_t end = utf8trunc(buf, MAXLEN - utf8len(ELLIPSIS));
|
||||||
strcpy(&buf[end], ELLIPSIS);
|
strcpy(&buf[end], ELLIPSIS);
|
||||||
}
|
}
|
||||||
return buf;
|
return buf;
|
||||||
|
Reference in New Issue
Block a user