X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Futil.c;h=5f6249eb045d2fbb938af32e135a6811695f5c77;hp=ebacee55b181c379fa9fd0fb31cf269d9d9609b0;hb=6f53e671aa7539cab02c9f739d84d28a343ca5bc;hpb=c6828d2794fcd00b6b0d2a040301c90ad424d14f diff --git a/src/shared/util.c b/src/shared/util.c index ebacee55b..5f6249eb0 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -2074,7 +2074,7 @@ int acquire_terminal( * ended our handle will be dead. It's important that * we do this after sleeping, so that we don't enter * an endless loop. */ - safe_close(fd); + fd = safe_close(fd); } safe_close(notify); @@ -3306,13 +3306,8 @@ unsigned lines(void) { l = 0; e = getenv("LINES"); - if (e) { - int r; - - r = safe_atou(e, &l); - if (r < 0) {} - /* do nothing, we fall back to l = 0 */ - } + if (e) + (void) safe_atou(e, &l); if (l <= 0) l = fd_lines(STDOUT_FILENO);