- returned char not needed to be explicitly const
- warn if pipe() fails in clvmd (more fixes here needed for error paths...)
- assign (and ignore) read() output in drain buffer
exit(3);
}
- pipe(child_pipe);
+ if (pipe(child_pipe)) {
+ perror("Error creating pipe");
+ exit(3);
+ }
switch (fork()) {
case -1:
}
/* Create a pipe and add the reading end to our FD list */
- pipe(comms_pipe);
+ if (pipe(comms_pipe))
+ DEBUGLOG("creating pipe failed: %s\n", strerror(errno));
+
newfd = malloc(sizeof(struct local_client));
if (!newfd) {
struct clvm_header reply;
}
if (ret == 0)
break;
- read(fifos->server, drainbuf, 127);
+ ret = read(fifos->server, drainbuf, 127);
}
while (bytes < size) {
return v * multiplier;
}
-const char alloc_policy_char(alloc_policy_t alloc)
+char alloc_policy_char(alloc_policy_t alloc)
{
int i;
* Allocation policy display conversion routines.
*/
const char *get_alloc_string(alloc_policy_t alloc);
-const char alloc_policy_char(alloc_policy_t alloc);
+char alloc_policy_char(alloc_policy_t alloc);
alloc_policy_t get_alloc_from_string(const char *str);
char yes_no_prompt(const char *prompt, ...) __attribute__ ((format(printf, 1, 2)));