Skip to content

Commit d471ae3

Browse files
committed
optimize struct definitions
1 parent a7cfedb commit d471ae3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/nanonext.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,16 @@ typedef struct nano_dialer_s {
143143

144144
typedef struct nano_stream_s {
145145
nng_stream *stream;
146-
enum {
147-
NANO_STREAM_DIALER,
148-
NANO_STREAM_LISTENER
149-
} mode;
150-
int textframes;
151146
union {
152147
nng_stream_dialer *dial;
153148
nng_stream_listener *list;
154149
} endpoint;
155150
nng_tls_config *tls;
151+
int textframes;
152+
enum {
153+
NANO_STREAM_DIALER,
154+
NANO_STREAM_LISTENER
155+
} mode;
156156
} nano_stream;
157157

158158
typedef enum nano_aio_typ {
@@ -169,11 +169,11 @@ typedef enum nano_aio_typ {
169169

170170
typedef struct nano_aio_s {
171171
nng_aio *aio;
172-
nano_aio_typ type;
173172
int mode;
174173
int result;
175174
void *data;
176175
void *next;
176+
nano_aio_typ type;
177177
} nano_aio;
178178

179179
typedef struct nano_cv_s {

0 commit comments

Comments
 (0)