diff options
author | Damien Miller <djm@mindrot.org> | 2014-05-15 13:48:26 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-05-15 13:48:26 +1000 |
commit | 633de33b192d808d87537834c316dc8b75fe1880 (patch) | |
tree | 54d456735ab7e2848dc8df5eba9c3dbb314b29e1 /bufaux.c | |
parent | 15271907843e4ae50dcfc83b3594014cf5e9607b (diff) |
- djm@cvs.openbsd.org 2014/04/28 03:09:18
[authfile.c bufaux.c buffer.h channels.c krl.c mux.c packet.c packet.h]
[ssh-keygen.c]
buffer_get_string_ptr's return should be const to remind
callers that futzing with it will futz with the actual buffer
contents
Diffstat (limited to 'bufaux.c')
-rw-r--r-- | bufaux.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: bufaux.c,v 1.57 2014/04/16 23:22:45 djm Exp $ */ +/* $OpenBSD: bufaux.c,v 1.58 2014/04/28 03:09:18 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -236,7 +236,7 @@ buffer_get_cstring(Buffer *buffer, u_int *length_ptr) return ret; } -void * +const void * buffer_get_string_ptr_ret(Buffer *buffer, u_int *length_ptr) { void *ptr; @@ -255,10 +255,10 @@ buffer_get_string_ptr_ret(Buffer *buffer, u_int *length_ptr) return (ptr); } -void * +const void * buffer_get_string_ptr(Buffer *buffer, u_int *length_ptr) { - void *ret; + const void *ret; if ((ret = buffer_get_string_ptr_ret(buffer, length_ptr)) == NULL) fatal("buffer_get_string_ptr: buffer error"); |