os: Remove fall-back on function argument

As `release-file` is used only once in the function, we don't need to
set its default value via `setq' if it is `nil`.
This commit is contained in:
Benjamin Kästner 2021-05-01 23:46:56 +02:00
parent c432776b95
commit 3ac03293a9
1 changed files with 1 additions and 2 deletions

View File

@ -297,9 +297,8 @@ the warning face with a battery level of 25% or less."
"Read the operating system from the given RELEASE-FILE.
If RELEASE-FILE is nil, use '/etc/os-release'."
(setq release-file (or release-file "/etc/os-release"))
(with-temp-buffer
(insert-file-contents release-file)
(insert-file-contents (or release-file "/etc/os-release"))
(goto-char (point-min))
(re-search-forward "PRETTY_NAME=\"\\(.*\\)\"")
(match-string 1)))