void somefunction(struct *str, const char *status)
{
if (str != NULL)
{
if (status != NULL)
{
str_copy(str->something, status, sizeof(str->something));
}
}
}
//从 CPU 周期高于 1 或低于 1 的意义上来说,哪个更好?哪个需要更多的 CPU 周期?
void somefunction(struct *str, const char *status)
{
if (str != NULL && status != NULL)
{
str_copy(str->something, status, sizeof(str->something));
}
}
哪个需要更多的 CPU 周期?