Skip to content

Commit 9cd8883

Browse files
committed
Merge pull request #106 from artygus/fix_make_warnings
fixed make warnings
2 parents 8803b75 + ce25da1 commit 9cd8883

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Diff for: src/websocket.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#endif
2626
#endif
2727

28+
#ifndef htons
29+
#include <arpa/inet.h>
30+
#endif
31+
2832
typedef int8_t ws_state;
2933
#define STATE_ERROR 1
3034
#define STATE_READ_HTTP_REQUEST 2
@@ -322,9 +326,7 @@ ws_status ws_send_frame(ws_t self,
322326
memcpy(out_tail, &sz64, payload_n);
323327
}
324328

325-
int i;
326-
for (i = 0; i < payload_n; i++)
327-
*out_tail++;
329+
out_tail += payload_n;
328330
}
329331

330332
if (is_masking) {

0 commit comments

Comments
 (0)