unittests: sshbuf_ptr not returns const

This commit is contained in:
Markus Friedl
2012-10-10 15:49:54 +02:00
parent c0624b12c7
commit 371a869f0a
3 changed files with 3 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ do_send_and_receive(struct ssh *from, struct ssh *to)
{
u_char type;
size_t len;
char *buf;
const u_char *buf;
int r;
for (;;) {

View File

@@ -113,8 +113,7 @@ sshbuf_fuzz_tests(void)
goto fuzz_reserve;
}
}
dp = sshbuf_ptr(p1);
ASSERT_PTR_NE(dp, NULL);
ASSERT_PTR_NE(sshbuf_ptr(p1), NULL);
ASSERT_SIZE_T_LE(sshbuf_max_size(p1), 16 * 1024);
}
ASSERT_PTR_NE(sshbuf_ptr(p1), NULL);

View File

@@ -47,7 +47,7 @@ struct sshbuf *
load_text_file(const char *name)
{
struct sshbuf *ret = load_file(name);
u_char *p;
const u_char *p;
/* Trim whitespace at EOL */
for (p = sshbuf_ptr(ret); sshbuf_len(ret) > 0;) {