1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-04 20:38:50 +01:00

common: Use GPG_ERR_INV_VALUE instead of GPG_ERR_EINVAL.

* common/sysutils.c (gnupg_inotify_watch_socket): Return
GPG_ERR_INV_VALUE for a missing socket name and set proper error
source.
--

By using a different value we can easier see whether the error is due
to a system call or from GnuPG code.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-10-26 09:02:10 +02:00
parent 21b318452a
commit ece13f177d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -988,7 +988,7 @@ gnupg_inotify_watch_socket (int *r_fd, const char *socket_name)
*r_fd = -1;
if (!socket_name)
return gpg_error (GPG_ERR_EINVAL);
return my_error (GPG_ERR_INV_VALUE);
fname = xtrystrdup (socket_name);
if (!fname)