1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-12-22 04:02:04 +03:00

Minor optimization in push/pull

This commit is contained in:
bel
2015-06-11 20:11:16 +02:00
parent 1e1582001f
commit 65b690fde7

View File

@@ -2935,10 +2935,9 @@ static int push(struct mg_context *ctx,
typedef size_t len_t;
#endif
if (timeout > 0) {
memset(&start, 0, sizeof(start));
memset(&now, 0, sizeof(now));
if (timeout > 0) {
clock_gettime(CLOCK_MONOTONIC, &start);
}
@@ -3034,10 +3033,9 @@ pull(FILE *fp, struct mg_connection *conn, char *buf, int len, double timeout)
typedef size_t len_t;
#endif
if (timeout > 0) {
memset(&start, 0, sizeof(start));
memset(&now, 0, sizeof(now));
if (timeout > 0) {
clock_gettime(CLOCK_MONOTONIC, &start);
}