return 0;
while (*uuid) {
- if (!isxdigit (*uuid) && *uuid != '-') return 0;
+ if (!isxdigit ((int)*uuid) && *uuid != '-') return 0;
uuid++;
}
return 1;
char *uuid = uuid_get_local ();
if (uuid) {
- strncpy (hostname_g, uuid, DATA_MAX_NAME_LEN);
- hostname_g[DATA_MAX_NAME_LEN-1] = '\0';
+ sstrncpy (hostname_g, uuid, DATA_MAX_NAME_LEN);
sfree (uuid);
return 0;
}