aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 22:45:45 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 22:45:49 +0100
commit7d8c71019c111134c15a7903ec9acfb5713755fe (patch)
tree3e7f2441e2a326cfe3ab810ddf00e9a1edc9ebbe /src/daemon.c
parentm (diff)
downloadsat-7d8c71019c111134c15a7903ec9acfb5713755fe.tar.gz
sat-7d8c71019c111134c15a7903ec9acfb5713755fe.tar.bz2
sat-7d8c71019c111134c15a7903ec9acfb5713755fe.tar.xz
partially implement satd-list, satd-rm, and satd-run
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/daemon.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/daemon.c b/src/daemon.c
index 8d9b1b3..b47e4d2 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -41,7 +41,7 @@
* @throws Any exception specified for realloc(3).
*/
int
-readall(int fd, char **buf, size_t *n);
+readall(int fd, char **buf, size_t *n)
{
char *buffer = NULL;
size_t ptr = 0;
@@ -54,7 +54,7 @@ readall(int fd, char **buf, size_t *n);
if (ptr == size) {
new = realloc(buffer, size <<= 1);
t (!new);
- buffer = wnew;
+ buffer = new;
}
got = read(fd, buffer + ptr, size - ptr);
t (got < 0);
@@ -90,10 +90,9 @@ fail:
* @throws Any exception specified for realloc(3).
*/
char **
-restore_array(char* buf, size_t len, size_t* n)
+restore_array(char *buf, size_t len, size_t *n)
{
char **rc = malloc((len + 1) * sizeof(char*));
- char *elem = NULL;
char **new;
size_t i, e = 0;
t (!rc);