* synced with the child process. the if-empty-statement
* construct is to quiet the warn-unused-result warning.
*/
- if (lxc_read_nointr(pipefd[0], &c, 1))
+ if (lxc_read_nointr(pipefd[0], &c, 1)) {
;
+ }
close(pipefd[0]);
close(pipefd[0]);
ret = snprintf(pipefd_str, sizeof(pipefd_str), "%d", pipefd[1]);
- if (ret < 0 || ret >= sizeof(pipefd_str)) {
+ if (ret < 0 || (size_t)ret >= sizeof(pipefd_str)) {
ERROR("Failed to create pid argument to pass to monitord");
_exit(EXIT_FAILURE);
}
struct passwd pwent;
struct passwd *pwentp = NULL;
char *buf;
- size_t bufsize;
+ ssize_t bufsize;
int ret;
if (!oparg || (oparg[0] == '\0'))
return false;
bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (bufsize == -1)
+ if (bufsize < 0)
bufsize = 1024;
buf = malloc(bufsize);