please lint.

git-svn-id: file:///svn/unbound/trunk@3305 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2015-01-06 14:18:03 +00:00
parent df73be98bd
commit f46bcc5b6f
3 changed files with 7 additions and 5 deletions

View File

@ -142,6 +142,7 @@ timeval_divide(struct timeval* avg, const struct timeval* sum, size_t d)
* The following function was generated using the openssl utility, using
* the command : "openssl dhparam -dsaparam -C 512"
*/
#ifndef S_SPLINT_S
DH *get_dh512()
{
static unsigned char dh512_p[]={
@ -170,6 +171,7 @@ DH *get_dh512()
dh->length = 160;
return(dh);
}
#endif /* SPLINT */
struct daemon_remote*
daemon_remote_create(struct config_file* cfg)
@ -326,7 +328,7 @@ add_open(const char* ip, int nr, struct listen_port** list, int noproto_is_err,
if(fd != -1) {
if (cfg->username && cfg->username[0])
chown(ip, cfg->uid, cfg->gid);
chmod(ip, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
chmod(ip, (mode_t)(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
}
} else {
hints.ai_socktype = SOCK_STREAM;

View File

@ -606,7 +606,7 @@ create_local_accept_sock(const char *path, int* noproto)
#endif
sun.sun_family = AF_LOCAL;
/* length is 92-108, 104 on FreeBSD */
strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
(void)strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
if ((s = socket(PF_LOCAL, SOCK_STREAM, 0)) == -1) {
log_err("Cannot create local socket %s (%s)",
@ -622,7 +622,7 @@ create_local_accept_sock(const char *path, int* noproto)
}
if (bind(s, (struct sockaddr *)&sun,
sizeof(struct sockaddr_un)) == -1) {
(socklen_t)sizeof(struct sockaddr_un)) == -1) {
log_err("Cannot bind local socket %s (%s)",
path, strerror(errno));
return -1;

View File

@ -209,8 +209,8 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd)
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
sun->sun_len = sizeof(sun);
#endif
strlcpy(sun->sun_path, svr, sizeof(sun->sun_path));
addrlen = sizeof(struct sockaddr_un);
(void)strlcpy(sun->sun_path, svr, sizeof(sun->sun_path));
addrlen = (socklen_t)sizeof(struct sockaddr_un);
addrfamily = AF_LOCAL;
#endif
} else {