i-scream/libstatgrab — pull request #10 by atsampson (2013-08-09 23:01:54+00:00)
Title: Fix list miscounting in sg_set_valid_filesystems.

Previously this counted the NULL entry that terminated the list -- so
the length was set to be one too high, and reading the list back with
sg_get_valid_filesystems would produce a spurious NULL at the end.

For example, try this before and afterwards:

```
#include
#include

int main() {
sg_init(0);

for (int j = 0; j < 3; j++) {

size_t n;
const char **s = sg_get_valid_filesystems(&n);
for (int i = 0; i < n; i++) {
printf("fs[%d] = '%s'\n", i, s[i]);
}

const char *new[] = {
"ext4",
"isofs",
NULL
};
sg_set_valid_filesystems(new);

printf("\n");

}

return 0;
}
```