summaryrefslogtreecommitdiff
path: root/sway/log.c
diff options
context:
space:
mode:
authorDrew DeVault <[email protected]>2015-08-19 19:30:26 -0400
committerDrew DeVault <[email protected]>2015-08-19 19:30:26 -0400
commit057d2e529d5cb22722b68aad759bdf0a48af6f20 (patch)
tree82ab38635b0207d99b53d8a2168865681d1babbd /sway/log.c
parent74c9df0c0798bb9fcc6f616e393a9edb01f3d0cb (diff)
parentf85d0740a83c32f9ef4d7f73b3dd25cff3a6239a (diff)
Merge pull request #92 from z33ky/master
A couple of cppcheck issues
Diffstat (limited to 'sway/log.c')
-rw-r--r--sway/log.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/log.c b/sway/log.c
index 9b9a9dc0..44f6e366 100644
--- a/sway/log.c
+++ b/sway/log.c
@@ -19,10 +19,10 @@ static const char *verbosity_colors[] = {
void init_log(int verbosity) {
v = verbosity;
/* set FD_CLOEXEC flag to prevent programs called with exec to write into logs */
- int i, flag;
+ int i;
int fd[] = { STDOUT_FILENO, STDIN_FILENO, STDERR_FILENO };
for (i = 0; i < 3; ++i) {
- flag = fcntl(fd[i], F_GETFD);
+ int flag = fcntl(fd[i], F_GETFD);
if (flag != -1) {
fcntl(fd[i], F_SETFD, flag | FD_CLOEXEC);
}