diff --git a/[refs] b/[refs] index 3a647824073b..6a7d17caa07a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 23b9da55c5b0feb484bd5e8615f4eb1ce4169453 +refs/heads/master: f62388187207bea83f1865d507bf892a1f9152c3 diff --git a/trunk/drivers/base/node.c b/trunk/drivers/base/node.c index 90aa2a11a933..af1a177216f1 100644 --- a/trunk/drivers/base/node.c +++ b/trunk/drivers/base/node.c @@ -592,11 +592,9 @@ static ssize_t print_nodes_state(enum node_states state, char *buf) { int n; - n = nodelist_scnprintf(buf, PAGE_SIZE, node_states[state]); - if (n > 0 && PAGE_SIZE > n + 1) { - *(buf + n++) = '\n'; - *(buf + n++) = '\0'; - } + n = nodelist_scnprintf(buf, PAGE_SIZE-2, node_states[state]); + buf[n++] = '\n'; + buf[n] = '\0'; return n; }