FreeBSD/contrib/tcpdump/print-beep.c
/* Check for a string but not go beyond length
 * Return TRUE on match, FALSE otherwise
 *
 * Looks at the first few chars up to tl1 ...
 */
Check for a string but not go beyond length
Return TRUE on match, FALSE otherwise

Looks at the first few chars up to tl1
Check for a string but not go beyond length Return TRUE on match FALSE otherwise Looks at the first few chars up to tl1
static int
l_strnstart(const char *tstr1, u_int tl1, const char *str2, u_int l2)
{
	if (tl1 > l2)
		return 0;
	return (strncmp(tstr1, str2, tl1) == 0 ? 1 : 0);
}
static int l_strnstart ( const char * tstr1 , u_int tl1 , const char * str2 , u_int l2 ) { if ( tl1 > l2 ) return 0 ; return ( strncmp ( tstr1 , str2 , tl1 ) == 0 ? 1 : 0 ) ; }
Check for a string but not go beyond length
 Return TRUE on match, FALSE otherwise
Check for a string but not go beyond length Return TRUE on match FALSE otherwise