cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob adc947f2392c3fefae62f6f28fabadd81c4e433e 415 bytes (raw)
$ git show gl-env:http_util.h	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 
/*
 * Copyright (C) 2012-2016 all contributors <cmogstored-public@bogomips.org>
 * License: GPLv3 or later (see COPYING for details)
 */
static inline uint8_t to_u8(size_t len)
{
	assert(len <= UINT8_MAX && "HTTP parser didn't check len <= U8MAX");
	return (uint8_t)len;
}

static inline uint16_t to_u16(size_t len)
{
	assert(len <= UINT16_MAX && "HTTP parser didn't check len <= U16MAX");
	return (uint16_t)len;
}

git clone https://yhbt.net/cmogstored.git