summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/Libgpg-error
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-07-23 10:38:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-07-23 10:38:14 +0000
commitb0856fbf8beebf4ffc5592096739e3d65c1bc3c7 (patch)
tree401086ceec1fb54ae98d07d21527bc6f60367796 /plugins/MirOTR/Libgpg-error
parentf7d6084247f9f89fe0eec55dd9d2522038ff23e3 (diff)
compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@14651 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/Libgpg-error')
-rw-r--r--plugins/MirOTR/Libgpg-error/strerror.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/MirOTR/Libgpg-error/strerror.c b/plugins/MirOTR/Libgpg-error/strerror.c
index b0efb3de4b..4013e7ae26 100644
--- a/plugins/MirOTR/Libgpg-error/strerror.c
+++ b/plugins/MirOTR/Libgpg-error/strerror.c
@@ -103,25 +103,25 @@ system_strerror_r (int no, char *buf, size_t buflen)
already thread-safe. */
static int
-system_strerror_r (int no, char *buf, size_t buflen)
+system_strerror_r(int no, char *buf, size_t buflen)
{
- char *errstr = strerror (no);
+ char *errstr = strerror(no);
- if (!errstr)
- {
- int saved_errno = errno;
+ if (!errstr)
+ {
+ int saved_errno = errno;
- if (saved_errno != EINVAL)
- snprintf (buf, buflen, "strerror failed: %i\n", errno);
- return saved_errno;
- }
- else
- {
- size_t errstr_len = strlen (errstr) + 1;
- size_t cpy_len = errstr_len < buflen ? errstr_len : buflen;
- memcpy (buf, errstr, cpy_len);
- return cpy_len == errstr_len ? 0 : ERANGE;
- }
+ if (saved_errno != EINVAL)
+ _snprintf(buf, buflen, "strerror failed: %i\n", errno);
+ return saved_errno;
+ }
+ else
+ {
+ size_t errstr_len = strlen(errstr) + 1;
+ size_t cpy_len = errstr_len < buflen ? errstr_len : buflen;
+ memcpy(buf, errstr, cpy_len);
+ return cpy_len == errstr_len ? 0 : ERANGE;
+ }
}
#endif