diff options
author | Guy Helmer <ghelmer@FreeBSD.org> | 2012-01-10 21:47:58 +0000 |
---|---|---|
committer | Guy Helmer <ghelmer@FreeBSD.org> | 2012-01-10 21:47:58 +0000 |
commit | 4a25aa061a2afec2af21caa4f2187d8544b2ea18 (patch) | |
tree | a19f24ac59e5727c15901c0a775e1630bf5859e8 /lib/libutil | |
parent | 719060e911bee58b7b8e61ef8664ff2c73509945 (diff) | |
download | src-4a25aa061a2afec2af21caa4f2187d8544b2ea18.tar.gz src-4a25aa061a2afec2af21caa4f2187d8544b2ea18.zip |
Style fixes courtesy of pjd.
Notes
Notes:
svn path=/head/; revision=229942
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/pidfile.3 | 6 | ||||
-rw-r--r-- | lib/libutil/pidfile.c | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/libutil/pidfile.3 b/lib/libutil/pidfile.3 index e11276f0d26c..c224a9b6fdee 100644 --- a/lib/libutil/pidfile.3 +++ b/lib/libutil/pidfile.3 @@ -100,7 +100,7 @@ function closes and removes a pidfile. .Pp The .Fn pidfile_fileno -function returns the file descriptor for the open pid file. +function returns the file descriptor for the open pidfile. .Sh RETURN VALUES The .Fn pidfile_open @@ -118,7 +118,9 @@ will be set. The .Fn pidfile_fileno function returns the low-level file descriptor. -It returns -1 and sets +It returns +.Li -1 +and sets .Va errno if a NULL .Vt pidfh diff --git a/lib/libutil/pidfile.c b/lib/libutil/pidfile.c index cf5accebe3b4..6bfa3767058d 100644 --- a/lib/libutil/pidfile.c +++ b/lib/libutil/pidfile.c @@ -270,6 +270,7 @@ pidfile_remove(struct pidfh *pfh) int pidfile_fileno(struct pidfh *pfh) { + if (pfh == NULL || pfh->pf_fd == -1) { errno = EDOOFUS; return (-1); |