summaryrefslogtreecommitdiff
path: root/lookup.h
blob: 38161b6c175d33857bfbe9902a51432253ef0495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * netsniff-ng - the packet sniffing beast
 * Copyright 2009, 2010 Daniel Borkmann.
 * Copyright 2014, 2015 Tobias Klauser
 * Subject to the GPL, version 2.
 */

#ifndef LOOKUP_H
#define LOOKUP_H

enum lookup_type {
	LT_PORTS_UDP,
	LT_PORTS_TCP,
	LT_ETHERTYPES,
	LT_OUI,
	LT_MAX,
};

extern void lookup_init(enum lookup_type which);
extern void lookup_cleanup(enum lookup_type which);

extern const char *lookup_port_udp(unsigned int id);
extern const char *lookup_port_tcp(unsigned int id);
extern const char *lookup_ether_type(unsigned int id);
extern const char *lookup_vendor(unsigned int id);

static inline const char *lookup_vendor_str(unsigned int id)
{
	return lookup_vendor(id) ? : "Unknown";
}

#endif /* LOOKUP_H */
xt.git/commit/?h=nds-private-remove&id=eea3dd4f1247aa8654194fb19ade22c94c42e41a'>eea3dd4f1247aa8654194fb19ade22c94c42e41a (diff)
ASoC: topology: avoid uninitialized kcontrol_type
When num_kcontrols is zero, widget->dobj.widget.kcontrol_type gets set to an uninitialized local variable: sound/soc/soc-topology.c: In function 'soc_tplg_dapm_widget_create': sound/soc/soc-topology.c:1566:36: error: 'kcontrol_type' may be used uninitialized in this function [-Werror=maybe-uninitialized] I could not figure out which of the valid types would be appropriate here, so this sets it to '0', which is invalid but at least well-defined here. There is probably a better way to address the issue. Fixes: eea3dd4f1247 ("ASoC: topology: Only free TLV for volume mixers of a widget") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat