Removed superfluous check for NULL target_dir; it is already handled
before this code.

Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-olive...@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.sepp...@vincit.fi>
---
 src/xlibi18n/lcFile.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/xlibi18n/lcFile.c b/src/xlibi18n/lcFile.c
index 21a546d..d7e375e 100644
--- a/src/xlibi18n/lcFile.c
+++ b/src/xlibi18n/lcFile.c
@@ -785,8 +785,7 @@ _XlcLocaleLibDirName(char *dir_name, size_t dir_len, char 
*lc_name)
                Xfree(name);
            continue;
        }
-       if ((1 + (target_dir ? strlen (target_dir) : 0) +
-            strlen("locale.dir")) < PATH_MAX) {
+       if ((1 + strlen (target_dir) + strlen("locale.dir")) < PATH_MAX) {
            sprintf(buf, "%s/locale.dir", target_dir);
            target_name = resolve_name(name, buf, RtoL);
        }
-- 
1.7.0.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to