summaryrefslogtreecommitdiff
path: root/schnorr.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-05-16 20:32:29 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-05-16 20:32:29 +1000
commitdbee308253931f8c1aeebf781d7e7730ff6a0dc1 (patch)
treea0b6552908f7b44431bcd70668eda863eaf97be2 /schnorr.c
parent64d22946d664dad8165f1fae9e78b53831ed728d (diff)
- dtucker@cvs.openbsd.org 2013/05/16 09:08:41
[log.c scp.c sshd.c serverloop.c schnorr.c sftp.c] Fix some "unused result" warnings found via clang and -portable. ok markus@
Diffstat (limited to 'schnorr.c')
-rw-r--r--schnorr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/schnorr.c b/schnorr.c
index 4d54d6881..05c2e7758 100644
--- a/schnorr.c
+++ b/schnorr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: schnorr.c,v 1.5 2010/12/03 23:49:26 djm Exp $ */ 1/* $OpenBSD: schnorr.c,v 1.6 2013/05/16 09:08:41 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Damien Miller. All rights reserved. 3 * Copyright (c) 2008 Damien Miller. All rights reserved.
4 * 4 *
@@ -488,12 +488,13 @@ debug3_bn(const BIGNUM *n, const char *fmt, ...)
488{ 488{
489 char *out, *h; 489 char *out, *h;
490 va_list args; 490 va_list args;
491 int ret;
491 492
492 out = NULL; 493 out = NULL;
493 va_start(args, fmt); 494 va_start(args, fmt);
494 vasprintf(&out, fmt, args); 495 ret = vasprintf(&out, fmt, args);
495 va_end(args); 496 va_end(args);
496 if (out == NULL) 497 if (ret == -1 || out == NULL)
497 fatal("%s: vasprintf failed", __func__); 498 fatal("%s: vasprintf failed", __func__);
498 499
499 if (n == NULL) 500 if (n == NULL)
@@ -513,12 +514,13 @@ debug3_buf(const u_char *buf, u_int len, const char *fmt, ...)
513 char *out, h[65]; 514 char *out, h[65];
514 u_int i, j; 515 u_int i, j;
515 va_list args; 516 va_list args;
517 int ret;
516 518
517 out = NULL; 519 out = NULL;
518 va_start(args, fmt); 520 va_start(args, fmt);
519 vasprintf(&out, fmt, args); 521 ret = vasprintf(&out, fmt, args);
520 va_end(args); 522 va_end(args);
521 if (out == NULL) 523 if (ret == -1 || out == NULL)
522 fatal("%s: vasprintf failed", __func__); 524 fatal("%s: vasprintf failed", __func__);
523 525
524 debug3("%s length %u%s", out, len, buf == NULL ? " (null)" : ""); 526 debug3("%s length %u%s", out, len, buf == NULL ? " (null)" : "");