summaryrefslogtreecommitdiff
path: root/bufaux.c
diff options
context:
space:
mode:
Diffstat (limited to 'bufaux.c')
-rw-r--r--bufaux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bufaux.c b/bufaux.c
index 4ef19c454..854fd510a 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bufaux.c,v 1.48 2010/02/02 22:49:34 djm Exp $ */ 1/* $OpenBSD: bufaux.c,v 1.49 2010/03/26 03:13:17 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -84,7 +84,8 @@ buffer_get_int_ret(u_int *ret, Buffer *buffer)
84 84
85 if (buffer_get_ret(buffer, (char *) buf, 4) == -1) 85 if (buffer_get_ret(buffer, (char *) buf, 4) == -1)
86 return (-1); 86 return (-1);
87 *ret = get_u32(buf); 87 if (ret != NULL)
88 *ret = get_u32(buf);
88 return (0); 89 return (0);
89} 90}
90 91
@@ -106,7 +107,8 @@ buffer_get_int64_ret(u_int64_t *ret, Buffer *buffer)
106 107
107 if (buffer_get_ret(buffer, (char *) buf, 8) == -1) 108 if (buffer_get_ret(buffer, (char *) buf, 8) == -1)
108 return (-1); 109 return (-1);
109 *ret = get_u64(buf); 110 if (ret != NULL)
111 *ret = get_u64(buf);
110 return (0); 112 return (0);
111} 113}
112 114