timezone: Fix compare_file comparison in timezone checking
PATCH 1/1 timezone: Fix compare_file comparison in timezone checking
The patch allow to compare file only when are not in the same path. The compare_file is used to understand if the set timezone if the same we are going to set
Signed-off-by Andrea Ricchi <[email protected]>
Signed-off-by Michael Trimarchi <[email protected]>
--- src/timezone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/timezone.c +2 -2
@@ -124,8 +124,8 @@ static int compare_file(void *src_map, struct stat *src_st,DBG ("real path %s path name %s" , real_path, pathname); -if (real_path &&g_strcmp0 (real_path, pathname)) -return -1 ; +if (real_path && !g_strcmp0 (real_path, pathname)) +return 0 ; fd =open (pathname,O_RDONLY |O_CLOEXEC );if (fd <0 )
Signature · 1 line
2.43.0