bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing cast. in fnmatch_loop.c


From: Alex Cherepanov
Subject: Missing cast. in fnmatch_loop.c
Date: Wed, 14 Apr 2004 10:03:53 -0400
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7b) Gecko/20040316

The cast is missing in lib/fnmatch_loop.c distributed with
textutils-2.1. . The patch is attached.



--- fnmatch_loop.c.old  Wed Apr 14 09:47:19 2004
+++ fnmatch_loop.c      Wed Apr 14 09:49:57 2004
@@ -1053,10 +1053,10 @@
            struct patternlist *newp;                                         \
                                                                              \
            if (opt == L('?') || opt == L('@'))                               \
-             newp = alloca (offsetof (struct patternlist, str)               \
+             newp = (struct patternlist *)alloca (offsetof (struct 
patternlist, str)  \
                             + (pattern_len * sizeof (CHAR)));                \
            else                                                              \
-             newp = alloca (offsetof (struct patternlist, str)               \
+             newp = (struct patternlist *)alloca (offsetof (struct 
patternlist, str)  \
                             + ((p - startp + 1) * sizeof (CHAR)));           \
            *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L('\0');    \
            newp->next = NULL;                                                \

reply via email to

[Prev in Thread] Current Thread [Next in Thread]