X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/2dc2f4788add40c2fe7c8fdede76189b54259155..c69ec1ac6875ae97d8cb70b4a6ed1fddfb9fd72d:/lib/queue.c?ds=sidebyside diff --git a/lib/queue.c b/lib/queue.c index 333fe7d..db28687 100644 --- a/lib/queue.c +++ b/lib/queue.c @@ -1,6 +1,6 @@ /* * This file is part of DisOrder. - * Copyright (C) 2004-2008 Richard Kettlewell + * Copyright (C) 2004-2009 Richard Kettlewell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,7 +55,10 @@ const char *const track_origins[] = { #define VALUE(q, offset, type) *(type *)((char *)q + offset) -/* add new entry @n@ to a doubly linked list just after @b@ */ +/** @brief Insert queue entry @p n just after @p b + * @param b Insert after this entry + * @param n New entry to insert + */ void queue_insert_entry(struct queue_entry *b, struct queue_entry *n) { n->prev = b; n->next = b->next; @@ -203,6 +206,7 @@ int queue_unmarshall(struct queue_entry *q, const char *s, char **vec; int nvec; + q->pid = -1; /* =none */ if(!(vec = split(s, &nvec, SPLIT_QUOTES, error_handler, u))) return -1; return queue_unmarshall_vec(q, nvec, vec, error_handler, u);