X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Fuilib.c;h=26429f8d25c5425558fc7d6a700214efaf916913;hb=ee9bb4f3a1851e386321d0d2a6442c2449b19201;hp=023904ecd476eaf0bdbeeaead81b58129f7e8696;hpb=0538f877d9bd213c13dc54b95a90d843cae95056;p=doldaconnect.git diff --git a/lib/uilib.c b/lib/uilib.c index 023904e..26429f8 100644 --- a/lib/uilib.c +++ b/lib/uilib.c @@ -1,6 +1,6 @@ /* * Dolda Connect - Modular multiuser Direct Connect-style client - * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com) + * Copyright (C) 2004 Fredrik Tolf * * 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 @@ -212,8 +212,10 @@ static struct qcmd *makeqcmd(wchar_t *name) if((cmd->name != NULL) && !wcscmp(cmd->name, name)) break; } - if(cmd == NULL) + if(cmd == NULL) { + errno = ENOSYS; /* Bleh */ return(NULL); + } } new = smalloc(sizeof(*new)); new->tag = tag++; @@ -497,6 +499,7 @@ int dc_queuecmd(int (*callback)(struct dc_response *), void *data, ...) } else { if(buf != NULL) free(buf); + errno = EINVAL; return(-1); } } else {