[PATCH gpgme 2/3] doc: Fix minor errors in I/O callback example
Daiki Ueno
ueno at gnu.org
Fri Feb 5 07:41:44 CET 2016
* gpgme.texi (I/O Callback Example): Fix typos and add missing return in
do_select when there is no FD to monitor.
Signed-off-by: Daiki Ueno <ueno at gnu.org>
---
doc/gpgme.texi | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index db94617..6a2e77e 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -5838,7 +5838,11 @@ do_select (struct event_loop *loop)
for (i = 0; i < MAX_FDS; i++)
if (fdlist[i].fd != -1)
FD_SET (fdlist[i].fd, fdlist[i].dir ? &rfds : &wfds);
- pthread_mutex_unlock (&loop->unlock);
+ pthread_mutex_unlock (&loop->lock);
+
+ /* No FD to watch. */
+ if (i == MAX_FDS)
+ return -1;
do
@{
@@ -5905,7 +5909,7 @@ main (int argc, char *argv[])
&result
@};
- init_gpgme (void);
+ init_gpgme ();
/* Initialize the loop structure. */
pthread_mutex_init (&loop.lock, NULL);
--
2.5.0
More information about the Gnupg-devel
mailing list