This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
d_namlen can be signed.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 16 Jun 2014 16:19:22 +0000 (12:19 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 16 Jun 2014 23:22:06 +0000 (19:22 -0400)
In HP-UX, it is either short or char (which can be either signed or unsigned),
depending on the compiler flags.

sv.c

diff --git a/sv.c b/sv.c
index 22a0096..e0b08d0 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12044,8 +12044,8 @@ Perl_dirp_dup(pTHX_ DIR *const dp, CLONE_PARAMS *const param)
        for(;;) {
            pos = PerlDir_tell(ret);
            if ((dirent = PerlDir_read(ret))) {
-               if (len == d_namlen(dirent)
-                && memEQ(name, dirent->d_name, len)) {
+               if (len == (STRLEN)d_namlen(dirent)
+                    && memEQ(name, dirent->d_name, len)) {
                    /* found it */
                    PerlDir_seek(ret, pos); /* step back */
                    break;