@@ -1193,7 +1193,7 @@ void dl_data_request (dlq_item_t *E)
1193
1193
first_segment .original_pid = E -> txdata -> pid ;
1194
1194
seglen = MIN (S -> n1_paclen - 2 , remaining_len );
1195
1195
1196
- if (seglen < 1 || seglen > S -> n1_paclen - 2 || seglen > remaining_len || seglen > sizeof (first_segment .segdata )) {
1196
+ if (seglen < 1 || seglen > S -> n1_paclen - 2 || seglen > remaining_len || seglen > ( int )( sizeof (first_segment .segdata ) )) {
1197
1197
text_color_set (DW_COLOR_ERROR );
1198
1198
dw_printf ("INTERNAL ERROR, Segmentation line %d, data length = %d, N1 = %d, segment length = %d, number to follow = %d\n" ,
1199
1199
__LINE__ , E -> txdata -> len , S -> n1_paclen , seglen , nseg_to_follow );
@@ -1225,7 +1225,7 @@ void dl_data_request (dlq_item_t *E)
1225
1225
subsequent_segment .header = nseg_to_follow ;
1226
1226
seglen = MIN (S -> n1_paclen - 1 , remaining_len );
1227
1227
1228
- if (seglen < 1 || seglen > S -> n1_paclen - 1 || seglen > remaining_len || seglen > sizeof (subsequent_segment .segdata )) {
1228
+ if (seglen < 1 || seglen > S -> n1_paclen - 1 || seglen > remaining_len || seglen > ( int )( sizeof (subsequent_segment .segdata ) )) {
1229
1229
text_color_set (DW_COLOR_ERROR );
1230
1230
dw_printf ("INTERNAL ERROR, Segmentation line %d, data length = %d, N1 = %d, segment length = %d, number to follow = %d\n" ,
1231
1231
__LINE__ , E -> txdata -> len , S -> n1_paclen , seglen , nseg_to_follow );
@@ -1928,7 +1928,7 @@ void lm_data_indication (dlq_item_t *E)
1928
1928
1929
1929
// Gather statistics useful for testing.
1930
1930
1931
- if (ftype >= 0 && ftype <= frame_not_AX25 ) {
1931
+ if (ftype <= frame_not_AX25 ) {
1932
1932
S -> count_recv_frame_type [ftype ]++ ;
1933
1933
}
1934
1934
@@ -6083,7 +6083,7 @@ static void negotiation_response (ax25_dlsm_t *S, struct xid_param_s *param)
6083
6083
// Other end might want 8.
6084
6084
// Seems unlikely. If it implements XID it should have modulo 128.
6085
6085
6086
- if (param -> modulo == G_UNKNOWN ) {
6086
+ if (param -> modulo == modulo_unknown ) {
6087
6087
param -> modulo = 8 ; // Not specified. Set default.
6088
6088
}
6089
6089
else {
@@ -6094,7 +6094,7 @@ static void negotiation_response (ax25_dlsm_t *S, struct xid_param_s *param)
6094
6094
// Erratum: 2006 version, section, 4.3.3.7 says default selective reject - reject.
6095
6095
// We can't do that.
6096
6096
6097
- if (param -> rej == G_UNKNOWN ) {
6097
+ if (param -> rej == unknown_reject ) {
6098
6098
param -> rej = (param -> modulo == 128 ) ? selective_reject : implicit_reject ; // not specified, set default
6099
6099
}
6100
6100
else {
@@ -6166,11 +6166,11 @@ static void negotiation_response (ax25_dlsm_t *S, struct xid_param_s *param)
6166
6166
6167
6167
static void complete_negotiation (ax25_dlsm_t * S , struct xid_param_s * param )
6168
6168
{
6169
- if (param -> rej != G_UNKNOWN ) {
6169
+ if (param -> rej != unknown_reject ) {
6170
6170
S -> srej_enabled = param -> rej >= selective_reject ;
6171
6171
}
6172
6172
6173
- if (param -> modulo != G_UNKNOWN ) {
6173
+ if (param -> modulo != modulo_unknown ) {
6174
6174
// Disaster if aren't agreeing on this.
6175
6175
S -> modulo = param -> modulo ;
6176
6176
}
0 commit comments