summaryrefslogtreecommitdiff
path: root/src/vconsole
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-24 19:45:16 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-31 14:36:12 -0400
commite62d8c3944745ed276e6d4f33153009860e5cfc5 (patch)
treee7f70ed3b80581017b6340723ab6f1d6b9c30bad /src/vconsole
parent3c8bed4ee061f96acb4d70a591a9849bddd2a659 (diff)
Modernization
Use _cleanup_ and wrap lines to ~80 chars and such.
Diffstat (limited to 'src/vconsole')
-rw-r--r--src/vconsole/vconsole-setup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index c1f662baa6..e11fd589cb 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
@@ -191,8 +191,8 @@ static void font_copy_to_all_vcs(int fd) {
for (i = 1; i <= 15; i++) {
char vcname[16];
- int vcfd;
struct console_font_op cfo;
+ int _cleanup_close_ vcfd = -1;
if (i == vcs.v_active)
continue;
@@ -212,8 +212,6 @@ static void font_copy_to_all_vcs(int fd) {
cfo.op = KD_FONT_OP_COPY;
cfo.height = vcs.v_active-1; /* tty1 == index 0 */
ioctl(vcfd, KDFONTOP, &cfo);
-
- close_nointr_nofail(vcfd);
}
}