]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ISDN strpbrk fix
authorKarsten Keil <kkeil@suse.de>
Tue, 2 Mar 2004 03:45:33 +0000 (19:45 -0800)
committerNathan Scott <nathans@sgi.com>
Tue, 2 Mar 2004 03:45:33 +0000 (19:45 -0800)
Here is a small ISDN fix for the current tree.

There is a compiler inlining/optimation problem with strpbrk, if it has
only a one character search string.  This results in a missing strchr
because the compiler internally replace strpbrk with strchr in this
case, but did so after inline handling stage.

drivers/isdn/icn/icn.c
drivers/isdn/isdnloop/isdnloop.c

index b715a91f3dbfc46a95bad69c275558f8f1be5441..391a8f139c082c4a17747c1266c1e1d864a7bcd5 100644 (file)
@@ -504,19 +504,19 @@ icn_parse_status(u_char * status, int channel, icn_card * card)
                case 3:
                        {
                                char *t = status + 6;
-                               char *s = strpbrk(t, ",");
+                               char *s = strchr(t, ',');
 
                                *s++ = '\0';
                                strlcpy(cmd.parm.setup.phone, t,
                                        sizeof(cmd.parm.setup.phone));
-                               s = strpbrk(t = s, ",");
+                               s = strchr(t = s, ',');
                                *s++ = '\0';
                                if (!strlen(t))
                                        cmd.parm.setup.si1 = 0;
                                else
                                        cmd.parm.setup.si1 =
                                            simple_strtoul(t, NULL, 10);
-                               s = strpbrk(t = s, ",");
+                               s = strchr(t = s, ',');
                                *s++ = '\0';
                                if (!strlen(t))
                                        cmd.parm.setup.si2 = 0;
index 040638d97480c2bb4599a78264bc9908a29d5a1c..fde3db9abb6088415540aa28118f50935058228f 100644 (file)
@@ -122,17 +122,17 @@ static void
 isdnloop_parse_setup(char *setup, isdn_ctrl * cmd)
 {
        char *t = setup;
-       char *s = strpbrk(t, ",");
+       char *s = strchr(t, ',');
 
        *s++ = '\0';
        strlcpy(cmd->parm.setup.phone, t, sizeof(cmd->parm.setup.phone));
-       s = strpbrk(t = s, ",");
+       s = strchr(t = s, ',');
        *s++ = '\0';
        if (!strlen(t))
                cmd->parm.setup.si1 = 0;
        else
                cmd->parm.setup.si1 = simple_strtoul(t, NULL, 10);
-       s = strpbrk(t = s, ",");
+       s = strchr(t = s, ',');
        *s++ = '\0';
        if (!strlen(t))
                cmd->parm.setup.si2 = 0;