summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-12-04 03:56:32 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-12-04 03:56:32 +0000
commitc5bb780a931110ce2696904f6b1b9b4907317921 (patch)
tree5f893b96fe7364258574b8ce95a74b4d83e90425 /src
parent7e781736c69e094a62e9ec4a57beb81e209ab48c (diff)
downloadirssi-c5bb780a931110ce2696904f6b1b9b4907317921.zip
removed useless if condition
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@954 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/formats.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c
index 469c20c4..cd47588c 100644
--- a/src/fe-common/core/formats.c
+++ b/src/fe-common/core/formats.c
@@ -144,14 +144,16 @@ void format_read_arglist(va_list va, FORMAT_REC *format,
{
int num, len, bufpos;
+ g_return_if_fail(format->params < arglist_size);
+
bufpos = 0;
arglist[format->params] = NULL;
- for (num = 0; num < format->params && num < arglist_size; num++) {
+ for (num = 0; num < format->params; num++) {
switch (format->paramtypes[num]) {
case FORMAT_STRING:
arglist[num] = (char *) va_arg(va, char *);
if (arglist[num] == NULL) {
- g_warning("read_arglist() : parameter %d is NULL", num);
+ g_warning("format_read_arglist() : parameter %d is NULL", num);
arglist[num] = "";
}
break;