5 void parse_opt_servers(memcached_st
*memc
,
13 assert(server_strings
);
16 end_ptr
= server_strings
+ strlen(server_strings
);
18 for (begin_ptr
= server_strings
, string
= index(server_strings
, ',');
20 string
= index(begin_ptr
, ','))
22 char buffer
[HUGE_STRING_LEN
];
26 memset(buffer
, 0, HUGE_STRING_LEN
);
29 memcpy(buffer
, begin_ptr
, string
- begin_ptr
);
34 size_t length
= strlen(begin_ptr
);
35 memcpy(buffer
, begin_ptr
, length
);
39 ptr
= index(buffer
, ':');
47 port
= strtol(ptr
, (char **)NULL
, 10);
50 memcached_server_add(memc
, buffer
, port
);
52 if (isspace(*begin_ptr
))