diff options
author | Rich Salz <rsalz@openssl.org> | 2016-03-22 10:52:13 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-03-31 16:27:52 -0400 |
commit | 475965f2ef8eaeb67f065a7eabd3a781da76305b (patch) | |
tree | 5ae05f2136579ebf8ba0d1c002109ad8734f5f20 /ssl/record/rec_layer_s3.c | |
parent | 1fab06a665333d4afdd2bc46a1ab787fd473ec49 (diff) |
Use return "" not set a var and return.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'ssl/record/rec_layer_s3.c')
-rw-r--r-- | ssl/record/rec_layer_s3.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 6d2f250b7b..773a6d68d9 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -250,44 +250,30 @@ void SSL_set_default_read_buffer_len(SSL *s, size_t len) const char *SSL_rstate_string_long(const SSL *s) { - const char *str; - switch (s->rlayer.rstate) { case SSL_ST_READ_HEADER: - str = "read header"; - break; + return "read header"; case SSL_ST_READ_BODY: - str = "read body"; - break; + return "read body"; case SSL_ST_READ_DONE: - str = "read done"; - break; + return "read done"; default: - str = "unknown"; - break; + return "unknown"; } - return (str); } const char *SSL_rstate_string(const SSL *s) { - const char *str; - switch (s->rlayer.rstate) { case SSL_ST_READ_HEADER: - str = "RH"; - break; + return "RH"; case SSL_ST_READ_BODY: - str = "RB"; - break; + return "RB"; case SSL_ST_READ_DONE: - str = "RD"; - break; + return "RD"; default: - str = "unknown"; - break; + return "unknown"; } - return (str); } int ssl3_read_n(SSL *s, int n, int max, int extend, int clearold) |