Coverage Report

Created: 2026-04-30 06:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/boringssl/crypto/bio/errno.cc
Line
Count
Source
1
// Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//     https://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#include <openssl/bio.h>
16
17
#include <errno.h>
18
19
#include "internal.h"
20
21
22
using namespace bssl;
23
24
0
int bssl::bio_errno_should_retry(int return_value) {
25
0
  if (return_value != -1) {
26
0
    return 0;
27
0
  }
28
29
0
  return
30
0
#ifdef EWOULDBLOCK
31
0
      errno == EWOULDBLOCK ||
32
0
#endif
33
0
#ifdef ENOTCONN
34
0
      errno == ENOTCONN ||
35
0
#endif
36
0
#ifdef EINTR
37
0
      errno == EINTR ||
38
0
#endif
39
0
#ifdef EAGAIN
40
0
      errno == EAGAIN ||
41
0
#endif
42
0
#ifdef EPROTO
43
0
      errno == EPROTO ||
44
0
#endif
45
0
#ifdef EINPROGRESS
46
0
      errno == EINPROGRESS ||
47
0
#endif
48
0
#ifdef EALREADY
49
0
      errno == EALREADY ||
50
0
#endif
51
0
      0;
52
0
}