X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e7eb3a2744aa45179daea235800753d3d1955338..cc3456940b6b30a0fc4f83226c34e4e873336cd0:/lib/wstat.c diff --git a/lib/wstat.c b/lib/wstat.c index dec036e..0ac2c17 100644 --- a/lib/wstat.c +++ b/lib/wstat.c @@ -1,6 +1,6 @@ /* * This file is part of DisOrder. - * Copyright (C) 2004, 2007, 2008 Richard Kettlewell + * Copyright (C) 2004, 2007-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 @@ -32,7 +32,7 @@ * @param w Exit status (e.g. from waitpid()) * @return Allocated string containing description of status */ -const char *wstat(int w) { +char *wstat(int w) { int n; char *r; @@ -48,7 +48,7 @@ const char *wstat(int w) { else n = byte_xasprintf(&r, "terminated with unknown wait status %#x", (unsigned)w); - return n >= 0 ? r : "[could not convert wait status]"; + return n >= 0 ? r : xstrdup("[could not convert wait status]"); } /*