aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-13 16:20:40 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-13 16:20:40 -0300
commit0b63d79b36790febd4c081bf8d6737df27529f8d (patch)
treea59ac63d213b00fb0dcaaa65f6d24526c4f260f7 /liolib.c
parent279c3a6961c60252f0368fdea889caf977f85fe0 (diff)
downloadlua-0b63d79b36790febd4c081bf8d6737df27529f8d.tar.gz
lua-0b63d79b36790febd4c081bf8d6737df27529f8d.tar.bz2
lua-0b63d79b36790febd4c081bf8d6737df27529f8d.zip
Details
- 'luaL_setfuncs' avoids creating closures for placeholders. - Fixed some warnings about unused values in comma expressions. - Comments.
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/liolib.c b/liolib.c
index 7d6d51e6..fa6a0939 100644
--- a/liolib.c
+++ b/liolib.c
@@ -39,7 +39,7 @@
39/* Check whether 'mode' matches '[rwa]%+?[L_MODEEXT]*' */ 39/* Check whether 'mode' matches '[rwa]%+?[L_MODEEXT]*' */
40static int l_checkmode (const char *mode) { 40static int l_checkmode (const char *mode) {
41 return (*mode != '\0' && strchr("rwa", *(mode++)) != NULL && 41 return (*mode != '\0' && strchr("rwa", *(mode++)) != NULL &&
42 (*mode != '+' || (++mode, 1)) && /* skip if char is '+' */ 42 (*mode != '+' || ((void)(++mode), 1)) && /* skip if char is '+' */
43 (strspn(mode, L_MODEEXT) == strlen(mode))); /* check extensions */ 43 (strspn(mode, L_MODEEXT) == strlen(mode))); /* check extensions */
44} 44}
45 45