Commit ae917a4b authored by Rob Latham's avatar Rob Latham
Browse files

stick with older standard in header file

C compilers on bebop are still c99 by default.
parent 12a1ac17
......@@ -21,12 +21,13 @@ typedef struct {
// caller is responsible for freeing up char buffer
static inline char *kv_protocol(const char *addr_str) {
int psize = 24;
int i;
char *protocol = (char*)malloc(psize);
memset(protocol, 0, psize);
/* we only need to the proto portion of the address to initialize */
for(int i=0; i<psize && addr_str[i] != '\0' && addr_str[i] != ':'; i++)
for(i=0; i<psize && addr_str[i] != '\0' && addr_str[i] != ':'; i++)
protocol[i] = addr_str[i];
return protocol;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment