 
                            ...
| Code Block | ||
|---|---|---|
| 
 | ||
| 
char *source;
char a[NTBS_SIZE];
/* ... */
if (source) {
  errno_t err;
  if ((err = strncpy_s(a, sizeof(a), source, 5));
  if (err != 0) {
    /* handle error */
  }
}
else {
  /* handle NULL string condition */
}
 | 
...
 
                            ...
| Code Block | ||
|---|---|---|
| 
 | ||
| 
char *source;
char a[NTBS_SIZE];
/* ... */
if (source) {
  errno_t err;
  if ((err = strncpy_s(a, sizeof(a), source, 5));
  if (err != 0) {
    /* handle error */
  }
}
else {
  /* handle NULL string condition */
}
 | 
...