File: str.c

package info (click to toggle)
httping 1.5.8-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 188 kB
  • ctags: 79
  • sloc: ansic: 1,695; makefile: 76
file content (22 lines) | stat: -rw-r--r-- 374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* Released under GPLv2 with exception for the OpenSSL library. See license.txt */

#include <string.h>
#include "error.h"
#include "mem.h"
#include "utils.h"

/*
Most unixes have this function already.

#ifndef _GNU_SOURCE
char *strndup(char *in, int size)
{
	char *out = mymalloc(size + 1, "strndup");

	memcpy(out, in, size);
	out[size] = 0x00;

	return out;
}
#endif
*/