time(&t);
if (!up) {
/* find an empty slot (i < maxvol) or the first free slot (i == maxvol)*/
- for (i = 0; i <= maxvol; i++) {
- if (srv[i].v_path == NULL && i < MAXVOLS) {
+ for (i = 0; i <= maxvol && i < MAXVOLS; i++) {
+ if (srv[i].v_path == NULL) {
up = &srv[i];
if ((up->v_path = strdup(volpath)) == NULL)
return -1;
(void)setlimits();
- host = iniparser_getstrdup(obj.iniconfig, INISEC_GLOBAL, "cnid listen", "localhost:4700");
+ host = atalk_iniparser_getstrdup(obj.iniconfig, INISEC_GLOBAL, "cnid listen", "localhost:4700");
if ((port = strrchr(host, ':')))
*port++ = 0;
else