8062370: Various minor code improvements

A lot of fixes useful to improve the code quality.

Reviewed-by: coleenp, dholmes
This commit is contained in:
Goetz Lindenmaier 2014-10-29 10:13:24 +01:00
parent f048251de8
commit 0aa09022fa
35 changed files with 141 additions and 64 deletions

View file

@ -663,7 +663,10 @@ const char* os::Posix::get_signal_name(int sig, char* out, size_t outlen) {
}
}
jio_snprintf(out, outlen, ret);
if (out && outlen > 0) {
strncpy(out, ret, outlen);
out[outlen - 1] = '\0';
}
return out;
}