Changeset 570 for trunk/src/sh_utils.c


Ignore:
Timestamp:
Sep 5, 2021, 12:40:51 PM (3 years ago)
Author:
katerina
Message:

Fixes for some compile/cppcheck warnings, version 4.4.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_utils.c

    r560 r570  
    12461246    }
    12471247
    1248   if (NULL == (new = calloc(1,strlen(new_in) + 1)))
     1248  len = strlen(new_in) + 1;
     1249  if (NULL == (new = calloc(1, len)))
    12491250    goto bail_mem;
    1250   sl_strncpy(new, new_in, strlen(new_in) + 1);
     1251  memcpy(new, new_in, len);
    12511252
    12521253  key = new;
Note: See TracChangeset for help on using the changeset viewer.