From db1c7510f954846a5b9854abfd9ab84d37f3c37c Mon Sep 17 00:00:00 2001 From: Ian Munsie Date: Thu, 11 Mar 2010 12:07:24 +0000 Subject: [PATCH] --- yaml --- r: 188130 b: refs/heads/master c: 8b4017d8c191822f1c93744e7876c9020e6209aa h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/isdn/hardware/eicon/message.c | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 9e255de62bb9..93214d95a9f7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dec9951b8ad86c591af7b452966bf48b307a4010 +refs/heads/master: 8b4017d8c191822f1c93744e7876c9020e6209aa diff --git a/trunk/drivers/isdn/hardware/eicon/message.c b/trunk/drivers/isdn/hardware/eicon/message.c index ae89fb89da64..4bd469b0c631 100644 --- a/trunk/drivers/isdn/hardware/eicon/message.c +++ b/trunk/drivers/isdn/hardware/eicon/message.c @@ -8423,17 +8423,17 @@ static word add_b23(PLCI *plci, API_PARSE *bp) pos = 0; else { - ((T30_INFO *)&nlc[1])->station_id[20 + pos++] = ' '; - ((T30_INFO *)&nlc[1])->station_id[20 + pos++] = ' '; + nlc[1 + offsetof(T30_INFO, station_id) + 20 + pos++] = ' '; + nlc[1 + offsetof(T30_INFO, station_id) + 20 + pos++] = ' '; len = (byte)b3_config_parms[2].length; if (len > 20) len = 20; if (CAPI_MAX_DATE_TIME_LENGTH + 2 + len + 2 + b3_config_parms[3].length <= CAPI_MAX_HEAD_LINE_SPACE) { for (i = 0; i < len; i++) - ((T30_INFO *)&nlc[1])->station_id[20 + pos++] = ((byte *)b3_config_parms[2].info)[1+i]; - ((T30_INFO *)&nlc[1])->station_id[20 + pos++] = ' '; - ((T30_INFO *)&nlc[1])->station_id[20 + pos++] = ' '; + nlc[1 + offsetof(T30_INFO, station_id) + 20 + pos++] = ((byte *)b3_config_parms[2].info)[1+i]; + nlc[1 + offsetof(T30_INFO, station_id) + 20 + pos++] = ' '; + nlc[1 + offsetof(T30_INFO, station_id) + 20 + pos++] = ' '; } } } @@ -8444,9 +8444,8 @@ static word add_b23(PLCI *plci, API_PARSE *bp) ((T30_INFO *)&nlc[1])->head_line_len = (byte)(pos + len); nlc[0] += (byte)(pos + len); for (i = 0; i < len; i++) - ((T30_INFO *)&nlc[1])->station_id[20 + pos++] = ((byte *)b3_config_parms[3].info)[1+i]; - } - else + nlc[1 + offsetof(T30_INFO, station_id) + 20 + pos++] = ((byte *)b3_config_parms[3].info)[1+i]; + } else ((T30_INFO *)&nlc[1])->head_line_len = 0; plci->nsf_control_bits = 0;