]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib: Eliminate dead code
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 19 Sep 2024 20:10:17 +0000 (22:10 +0200)
committerAlejandro Colomar <alx@kernel.org>
Sun, 29 Sep 2024 10:23:05 +0000 (12:23 +0200)
commite6a5484cedb674b09a46aafe3b1f8901fde62349
tree45881192261d4771923527ae46eff5ec8930b499
parentdd6cddd481c38b824087aba7be86f58b3985fe45
lib: Eliminate dead code

The tz function is only called if ENV_TZ starts with a slash.

If the specified file cannot be read, the code implies that ENV_TZ
would be returned if it does not start with a slash.

Since we know that it DOES start with a slash, the code can be
simplified to state that "TZ=CST6CDT" is returned as a default if
the specified file cannot be read.

Benefit of this change is that strcpy's use case here can be
easier verified.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/tz.c