enum {E_SYNTAX, E_READ, E_WRITE, E_SOCKET, E_INIT_SOCK_ADDR, E_CONNECT, E_CREDENTIALS, E_SELECT, E_OVERRUN};
-void para_log(__unused int ll, __unused const char* fmt,...) /* no logging */
+void para_log(__a_unused int ll, __a_unused const char* fmt,...) /* no logging */
{
}
static char *configfile_exists(void)
{
static char *config_file;
- struct stat statbuf;
+ struct stat statbuf;
if (!config_file) {
config_file = make_message("%s/.paraslash/audioc.conf", home);
free(home);
}
- if (!stat(config_file, &statbuf))
+ if (!stat(config_file, &statbuf))
return config_file;
return NULL;
}
FD_ZERO(&wfd);
if (loaded && loaded > 10000)
fprintf(stderr, "loaded: %d\n", loaded);
- if (loaded < conf.bufsize_arg) {
- FD_SET(fd, &rfd);
- max_fileno = MAX(max_fileno, fd);
- }
+ if (loaded < conf.bufsize_arg)
+ para_fd_set(fd, &rfd, &max_fileno);
if (loaded > 0) {
- FD_SET(STDOUT_FILENO, &wfd);
- max_fileno = MAX(max_fileno, STDOUT_FILENO);
+ para_fd_set(STDOUT_FILENO, &wfd, &max_fileno);
check_write = 1;
}
ret = -E_OVERRUN;
goto out;
}
if (loaded < conf.bufsize_arg && FD_ISSET(fd, &rfd)) {
- len = recv_bin_buffer(fd, buf + loaded,
+ len = recv_bin_buffer(fd, buf + loaded,
conf.bufsize_arg - loaded);
if (len <= 0) {
ret = len < 0? -E_READ : 0;