diff options
author | Josh Gao <jmgao@google.com> | 2017-08-10 12:30:25 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-08-10 12:30:47 -0700 |
commit | 83a0c9c65a60a92d3ea5542596b3ba56db492c37 (patch) | |
tree | 64bb0c050c4db9ad9d721e05e3e199bfd02e60b0 /event_tagging.c | |
parent | af241a5c8c2cde0fab7d7d563276c1095b00e3b4 (diff) | |
download | libevent-83a0c9c65a60a92d3ea5542596b3ba56db492c37.tar.gz |
Revert "Upgrade to 2.1.8-stable (2017-01-22)." and "Probably Mac build fix?"android-o-iot-preview-5o-iot-preview-5
This reverts commits 2a572d125a91a4aafd3ad8ce87259fc640fa0763 and
af241a5c8c2cde0fab7d7d563276c1095b00e3b4, which break tombstoned.
Bug: http://b/64543673
Test: manual + treehugger
Diffstat (limited to 'event_tagging.c')
-rw-r--r-- | event_tagging.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/event_tagging.c b/event_tagging.c index 6459dfa..eea4bfc 100644 --- a/event_tagging.c +++ b/event_tagging.c @@ -26,27 +26,25 @@ */ #include "event2/event-config.h" -#include "evconfig-private.h" -#ifdef EVENT__HAVE_SYS_TYPES_H +#ifdef _EVENT_HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#ifdef EVENT__HAVE_SYS_PARAM_H +#ifdef _EVENT_HAVE_SYS_PARAM_H #include <sys/param.h> #endif -#ifdef _WIN32 +#ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <winsock2.h> #include <windows.h> #undef WIN32_LEAN_AND_MEAN -#endif - -#ifdef EVENT__HAVE_SYS_IOCTL_H +#else #include <sys/ioctl.h> #endif + #include <sys/queue.h> -#ifdef EVENT__HAVE_SYS_TIME_H +#ifdef _EVENT_HAVE_SYS_TIME_H #include <sys/time.h> #endif @@ -54,10 +52,10 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#ifndef _WIN32 +#ifndef WIN32 #include <syslog.h> #endif -#ifdef EVENT__HAVE_UNISTD_H +#ifdef _EVENT_HAVE_UNISTD_H #include <unistd.h> #endif #include <limits.h> @@ -213,14 +211,7 @@ decode_tag_internal(ev_uint32_t *ptag, struct evbuffer *evbuf, int dodrain) while (count++ < len) { ev_uint8_t lower = *data++; - if (shift >= 28) { - /* Make sure it fits into 32 bits */ - if (shift > 28) - return (-1); - if ((lower & 0x7f) > 15) - return (-1); - } - number |= (lower & (unsigned)0x7f) << shift; + number |= (lower & 0x7f) << shift; shift += 7; if (!(lower & 0x80)) { |