summaryrefslogtreecommitdiff
path: root/src/netops.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-10-10 18:06:36 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-10-10 18:06:36 +0200
commitbab92a8dcf66d93afb41c946c238841df74fff0e (patch)
treec31f39d53be3c901d7a2e7be4d72375753c2ddce /src/netops.h
parent942a7b39edad519748456ddce97cf77a93c9babc (diff)
parent062804570c3e25170b52f849da173f8266b5e33e (diff)
downloadlibgit2-bab92a8dcf66d93afb41c946c238841df74fff0e.tar.gz
Merge pull request #2575 from cirosantilli/factor-struct-typedef
[factor] Join typedef and struct definitions in single file.
Diffstat (limited to 'src/netops.h')
-rw-r--r--src/netops.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/netops.h b/src/netops.h
index beb0e0760..8ad915301 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -14,34 +14,28 @@
# include <openssl/ssl.h>
#endif
-struct gitno_ssl {
+typedef struct gitno_ssl {
#ifdef GIT_SSL
SSL *ssl;
#else
size_t dummy;
#endif
-};
-
-typedef struct gitno_ssl gitno_ssl;
+} gitno_ssl;
/* Represents a socket that may or may not be using SSL */
-struct gitno_socket {
+typedef struct gitno_socket {
GIT_SOCKET socket;
gitno_ssl ssl;
-};
+} gitno_socket;
-typedef struct gitno_socket gitno_socket;
-
-struct gitno_buffer {
+typedef struct gitno_buffer {
char *data;
size_t len;
size_t offset;
gitno_socket *socket;
int (*recv)(struct gitno_buffer *buffer);
void *cb_data;
-};
-
-typedef struct gitno_buffer gitno_buffer;
+} gitno_buffer;
/* Flags to gitno_connect */
enum {