Skip to content
This repository has been archived by the owner on Oct 22, 2020. It is now read-only.

Commit

Permalink
Refactored: moved write_empty_string function back
Browse files Browse the repository at this point in the history
  • Loading branch information
andj committed Jul 5, 2011
1 parent 0c33299 commit 360ff29
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ssl.c
Expand Up @@ -2776,6 +2776,14 @@ key_state_soft_reset (struct tls_session *session)
* Read/write strings from/to a struct buffer with a u16 length prefix.
*/

static bool
write_empty_string (struct buffer *buf)
{
if (!buf_write_u16 (buf, 0))
return false;
return true;
}

static bool
write_string (struct buffer *buf, const char *str, const int maxlen)
{
Expand All @@ -2789,14 +2797,6 @@ write_string (struct buffer *buf, const char *str, const int maxlen)
return true;
}

static bool
write_empty_string (struct buffer *buf)
{
if (!buf_write_u16 (buf, 0))
return false;
return true;
}

static bool
read_string (struct buffer *buf, char *str, const unsigned int capacity)
{
Expand Down

0 comments on commit 360ff29

Please sign in to comment.