]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Thu, 1 Jun 2017 04:51:58 +0000 (04:51 +0000)
committerDamien Miller <djm@mindrot.org>
Thu, 1 Jun 2017 04:55:23 +0000 (14:55 +1000)
fix casts re constness

Upstream-ID: e38f2bac162b37dbaf784d349c8327a6626fa266

bitmap.c
sshbuf-getput-basic.c

index 71f87ec54ae8f1051f35bb58817dd25ec7d8e762..e8320d8c082eaf62643441a8eb915d4598ff6f93 100644 (file)
--- a/bitmap.c
+++ b/bitmap.c
@@ -189,7 +189,7 @@ bitmap_from_string(struct bitmap *b, const void *p, size_t l)
 {
        int r;
        size_t i, offset, shift;
-       u_char *s = (u_char *)p;
+       const u_char *s = (const u_char *)p;
 
        if (l > BITMAP_MAX / 8)
                return -1;
index 74c49be7cc62d699fcdd39f486bac3d4cff58adb..50648258f48d5d2e14de968d806a0d4559842023 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sshbuf-getput-basic.c,v 1.6 2016/06/16 11:00:17 dtucker Exp $ */
+/*     $OpenBSD: sshbuf-getput-basic.c,v 1.7 2017/06/01 04:51:58 djm Exp $     */
 /*
  * Copyright (c) 2011 Damien Miller
  *
@@ -365,7 +365,7 @@ sshbuf_put_string(struct sshbuf *buf, const void *v, size_t len)
 int
 sshbuf_put_cstring(struct sshbuf *buf, const char *v)
 {
-       return sshbuf_put_string(buf, (u_char *)v, v == NULL ? 0 : strlen(v));
+       return sshbuf_put_string(buf, v, v == NULL ? 0 : strlen(v));
 }
 
 int