chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various fixes for typos found by lintian (#3705)
[elogind.git]
/
src
/
libelogind
/
sd-login
/
sd-login.c
diff --git
a/src/libelogind/sd-login/sd-login.c
b/src/libelogind/sd-login/sd-login.c
index ac22fa3454ce57a5fc757c5726c3309752d67acd..f41e1a855b37dfbb0a18b94b955f19f0d3afab8c 100644
(file)
--- a/
src/libelogind/sd-login/sd-login.c
+++ b/
src/libelogind/sd-login/sd-login.c
@@
-1,5
+1,3
@@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-150,7
+148,7
@@
_public_ int sd_pid_get_cgroup(pid_t pid, char **cgroup) {
/* The internal APIs return the empty string for the root
* cgroup, let's return the "/" in the public APIs instead, as
/* The internal APIs return the empty string for the root
* cgroup, let's return the "/" in the public APIs instead, as
- * that's easier and less ambig
i
ous for people to grok. */
+ * that's easier and less ambig
u
ous for people to grok. */
if (isempty(c)) {
free(c);
c = strdup("/");
if (isempty(c)) {
free(c);
c = strdup("/");
@@
-380,7
+378,7
@@
static int file_of_seat(const char *seat, char **_p) {
if (!filename_is_valid(seat))
return -EINVAL;
if (!filename_is_valid(seat))
return -EINVAL;
- p = strappend("/run/systemd/seats/", seat);
+
p = strappend("/run/systemd/seats/", seat);
} else {
_cleanup_free_ char *buf = NULL;
} else {
_cleanup_free_ char *buf = NULL;
@@
-444,10
+442,10
@@
static int uid_get_array(uid_t uid, const char *variable, char ***array) {
r = parse_env_file(p, NEWLINE, variable, &s, NULL);
if (r == -ENOENT || (r >= 0 && isempty(s))) {
r = parse_env_file(p, NEWLINE, variable, &s, NULL);
if (r == -ENOENT || (r >= 0 && isempty(s))) {
-
if (array)
-
*array = NULL;
-
return 0;
-
}
+ if (array)
+ *array = NULL;
+ return 0;
+ }
if (r < 0)
return r;
if (r < 0)
return r;
@@
-862,7
+860,7
@@
_public_ int sd_get_uids(uid_t **users) {
errno = 0;
de = readdir(d);
errno = 0;
de = readdir(d);
- if (!de && errno
!=
0)
+ if (!de && errno
>
0)
return -errno;
if (!de)
return -errno;
if (!de)
@@
-1069,7
+1067,8
@@
_public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) {
_public_ sd_login_monitor* sd_login_monitor_unref(sd_login_monitor *m) {
int fd;
_public_ sd_login_monitor* sd_login_monitor_unref(sd_login_monitor *m) {
int fd;
- assert_return(m, NULL);
+ if (!m)
+ return NULL;
fd = MONITOR_TO_FD(m);
close_nointr(fd);
fd = MONITOR_TO_FD(m);
close_nointr(fd);