static char **get_all_atts(int *num_atts)
{
int fd = client_cmd("laa");
- FILE *pipe;
+ FILE *f;
char **ret = NULL, *buf;
if (fd < 0)
return NULL;
- pipe = fdopen(fd, "r");
- if (!pipe) {
+ f = fdopen(fd, "r");
+ if (!f) {
close(fd);
return NULL;
}
*num_atts = 0;
buf = para_malloc(MAXLINE * sizeof(char));
- while (fgets(buf, MAXLINE - 1, pipe) && *buf) {
+ while (fgets(buf, MAXLINE - 1, f) && *buf) {
size_t n = strlen(buf);
buf[n - 1] = '\0';
if (choice_len < n - 1)