diff options
| author | Edward Thomson <ethomson@github.com> | 2016-12-29 12:25:15 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@github.com> | 2016-12-29 12:26:03 +0000 |
| commit | 909d5494368a00809bc42f4780e86f4dd66e4422 (patch) | |
| tree | 637e98589830666f2326b37bcfcfc25dfc773b5a /src/socket_stream.c | |
| parent | 238b8ccd1aeec0e0d6e50c5050527a8107304bfb (diff) | |
| download | libgit2-909d5494368a00809bc42f4780e86f4dd66e4422.tar.gz | |
giterr_set: consistent error messages
Error messages should be sentence fragments, and therefore:
1. Should not begin with a capital letter,
2. Should not conclude with punctuation, and
3. Should not end a sentence and begin a new one
Diffstat (limited to 'src/socket_stream.c')
| -rw-r--r-- | src/socket_stream.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/socket_stream.c b/src/socket_stream.c index 71f49118e..fca411717 100644 --- a/src/socket_stream.c +++ b/src/socket_stream.c @@ -57,7 +57,7 @@ static int close_socket(GIT_SOCKET s) return -1; if (0 != WSACleanup()) { - giterr_set(GITERR_OS, "Winsock cleanup failed"); + giterr_set(GITERR_OS, "winsock cleanup failed"); return -1; } @@ -82,13 +82,13 @@ int socket_connect(git_stream *stream) WSADATA wsd; if (WSAStartup(MAKEWORD(2,2), &wsd) != 0) { - giterr_set(GITERR_OS, "Winsock init failed"); + giterr_set(GITERR_OS, "winsock init failed"); return -1; } if (LOBYTE(wsd.wVersion) != 2 || HIBYTE(wsd.wVersion) != 2) { WSACleanup(); - giterr_set(GITERR_OS, "Winsock init failed"); + giterr_set(GITERR_OS, "winsock init failed"); return -1; } #endif @@ -99,7 +99,7 @@ int socket_connect(git_stream *stream) if ((ret = p_getaddrinfo(st->host, st->port, &hints, &info)) != 0) { giterr_set(GITERR_NET, - "Failed to resolve address for %s: %s", st->host, p_gai_strerror(ret)); + "failed to resolve address for %s: %s", st->host, p_gai_strerror(ret)); return -1; } @@ -121,7 +121,7 @@ int socket_connect(git_stream *stream) /* Oops, we couldn't connect to any address */ if (s == INVALID_SOCKET && p == NULL) { - giterr_set(GITERR_OS, "Failed to connect to %s", st->host); + giterr_set(GITERR_OS, "failed to connect to %s", st->host); p_freeaddrinfo(info); return -1; } |
