Changeset 1738


Ignore:
Timestamp:
Feb 22, 2014, 8:54:52 PM (12 years ago)
Author:
John Small
Message:

Ticket #519: Corrected mis-coded but probably harmless calls to strtol and removed unneeded second parameter variables.

Location:
trunk/dll
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1729 r1738  
    758758                }
    759759              }
    760               else if (*p) 
     760              else if (*p)
    761761                p++;
    762762            }
     
    24192419         */
    24202420        {
    2421           CHAR *p, *pp;
     2421          CHAR *p;
    24222422          ULONG z, was;
    24232423          APIRET rc;
     
    24272427            if (rc == ERROR_ACCESS_DENIED) {
    24282428              p = strrchr(dcd->workdir, '.');
    2429               if (p) {
     2429              if (p) {          /* jbs: What if there is no "."? Give up? */
    24302430                p++;
    2431                 pp = p;
    2432                 was = strtoul(p, &pp, 16);
     2431                was = strtoul(p, NULL, 16);
    24332432                for (z = 0; z < 99; z++) {
    24342433                  was++;
  • trunk/dll/killproc.c

    r1628 r1738  
    3333  26 Aug 11 GKY Add a low mem version of xDosAlloc* wrappers; move error checking into all the
    3434                xDosAlloc* wrappers.
     35  22 Aug 14 JBS Ticket #519: Corrected mis-coded but probably harmless calls to strtol
     36                and removed unneeded second parameter variables.
    3537
    3638***********************************************************************/
     
    312314        if (*s == ' ' && s[5] == ' ' && isxdigit(s[1]) &&
    313315            isxdigit(s[2]) && isxdigit(s[3]) && isxdigit(s[4])) {
    314           p = &s[1];
    315           pid = strtol(&s[1], &p, 16);
     316          pid = strtol(&s[1], NULL, 16);
    316317          if (pid && pid != mypid) {
    317318            strcpy(progname, &s[30]);
     
    504505      if (sSelect >= 0) {
    505506
    506         CHAR s[31], *p;
     507        CHAR s[31];
    507508        APIRET error;
    508509
     
    513514                          MPFROM2SHORT(sSelect, 30), MPFROMP(s));
    514515        if (*s) {
    515           p = s;
    516           pid = strtol(s, &p, 16);
     516          pid = strtol(s, NULL, 16);
    517517          if (pid) {
    518518            if (SHORT1FROMMP(mp1) == DID_OK) {
Note: See TracChangeset for help on using the changeset viewer.