[Pkg-gnupg-commit] [libassuan] 158/437: 2006-09-19 Marcus Brinkmann <marcus at g10code.de>
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:33:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit c5ef3c8e3afb115e0365e545eaea5e09b2a14d7a
Author: Marcus Brinkmann <mb at g10code.com>
Date: Tue Sep 19 10:17:51 2006 +0000
2006-09-19 Marcus Brinkmann <marcus at g10code.de>
* mkerrors (_assuan_error): Change return type to assuan_error_t.
* assuan-buffer.c (_assuan_read_line): Change return type to
assuan_error_t. Map returned value of -1.
(_assuan_write_line): Change type of RC to assuan_error_t.
* assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for
prototypes.
---
src/ChangeLog | 7 +++++++
src/assuan-buffer.c | 6 +++---
src/assuan-client.c | 3 ++-
src/assuan-defs.h | 4 ++--
src/mkerrors | 2 +-
5 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 4b02eb5..ec9e288 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2006-09-19 Marcus Brinkmann <marcus at g10code.de>
+ * mkerrors (_assuan_error): Change return type to assuan_error_t.
+ * assuan-buffer.c (_assuan_read_line): Change return type to
+ assuan_error_t. Map returned value of -1.
+ (_assuan_write_line): Change type of RC to assuan_error_t.
+ * assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for
+ prototypes.
+
* assuan-defs.h (unsetenv): Define correctly.
2006-09-14 Werner Koch <wk at g10code.com>
diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c
index 0a49b0d..5580392 100644
--- a/src/assuan-buffer.c
+++ b/src/assuan-buffer.c
@@ -95,7 +95,7 @@ readline (assuan_context_t ctx, char *buf, size_t buflen,
/* Function returns an Assuan error. */
-int
+assuan_error_t
_assuan_read_line (assuan_context_t ctx)
{
char *line = ctx->inbound.line;
@@ -104,7 +104,7 @@ _assuan_read_line (assuan_context_t ctx)
char *endp = 0;
if (ctx->inbound.eof)
- return -1;
+ return _assuan_error (-1);
atticlen = ctx->inbound.attic.linelen;
if (atticlen)
@@ -243,7 +243,7 @@ assuan_error_t
_assuan_write_line (assuan_context_t ctx, const char *prefix,
const char *line, size_t len)
{
- int rc = 0;
+ assuan_error_t rc = 0;
size_t prefixlen = prefix? strlen (prefix):0;
/* Make sure that the line is short enough. */
diff --git a/src/assuan-client.c b/src/assuan-client.c
index a5d9798..06e3966 100644
--- a/src/assuan-client.c
+++ b/src/assuan-client.c
@@ -139,7 +139,8 @@ assuan_transact (assuan_context_t ctx,
int (*status_cb)(void*, const char *),
void *status_cb_arg)
{
- int rc, okay, off;
+ assuan_error_t rc;
+ int okay, off;
char *line;
int linelen;
diff --git a/src/assuan-defs.h b/src/assuan-defs.h
index 9c987e2..cf7ce09 100644
--- a/src/assuan-defs.h
+++ b/src/assuan-defs.h
@@ -200,7 +200,7 @@ void _assuan_init_uds_io (assuan_context_t ctx);
int _assuan_register_std_commands (assuan_context_t ctx);
/*-- assuan-buffer.c --*/
-int _assuan_read_line (assuan_context_t ctx);
+assuan_error_t _assuan_read_line (assuan_context_t ctx);
int _assuan_cookie_write_data (void *cookie, const char *buffer, size_t size);
int _assuan_cookie_write_flush (void *cookie);
assuan_error_t _assuan_write_line (assuan_context_t ctx, const char *prefix,
@@ -215,7 +215,7 @@ assuan_error_t _assuan_read_from_server (assuan_context_t ctx,
/* Map error codes as used in this implementaion to the libgpg-error
codes. */
-int _assuan_error (int oldcode);
+assuan_error_t _assuan_error (int oldcode);
/* Extrac the erro code from A. This works for both the old and the
new style error codes. This needs to be whenever an error code is
diff --git a/src/mkerrors b/src/mkerrors
index b5ab114..459c808 100755
--- a/src/mkerrors
+++ b/src/mkerrors
@@ -52,7 +52,7 @@ assuan_set_assuan_err_source (int errsource)
/* Helper to map old style Assuan error codes to gpg-error codes.
This is used internally to keep an compatible ABI. */
-int
+assuan_error_t
_assuan_error (int oldcode)
{
unsigned int n;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list