Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msg/simple/Pipe:the returned value for do_recv unequal to zero #10272

Merged
merged 1 commit into from Mar 13, 2017

Commits on Nov 24, 2016

  1. msg/simple/Pipe:the returned value for do_recv unequal to zero

    the returned value for do_recv unequal to zero:
    
    ssize_t Pipe::do_recv(char *buf, size_t len, int flags)
    {
    again:
      ssize_t got = ::recv( sd, buf, len, flags );
      if (got < 0) {
        if (errno == EINTR) {
          goto again;
        }
        ldout(msgr->cct, 10) << **func** << " socket " << sd << " returned "
                 << got << " " << cpp_strerror(errno) << dendl;
        return -1;
      }
      if (got == 0) {
        return -1;
      }
      return got;
    }
    
    so here '=' can be removed
    
    Signed-off-by: zhang.zezhu <zhang.zezhu@zte.com.cn>
    yonghengdexin735 committed Nov 24, 2016
    Copy the full SHA
    dd7a58b View commit details
    Browse the repository at this point in the history