@@ -418,8 +418,8 @@ void nghttp2_frame_unpack_priority_spec(nghttp2_priority_spec *pri_spec,
418
418
nghttp2_priority_spec_init (pri_spec , dep_stream_id , weight , exclusive );
419
419
}
420
420
421
- int nghttp2_frame_unpack_headers_payload (nghttp2_headers * frame ,
422
- const uint8_t * payload ) {
421
+ void nghttp2_frame_unpack_headers_payload (nghttp2_headers * frame ,
422
+ const uint8_t * payload ) {
423
423
if (frame -> hd .flags & NGHTTP2_FLAG_PRIORITY ) {
424
424
nghttp2_frame_unpack_priority_spec (& frame -> pri_spec , payload );
425
425
} else {
@@ -428,11 +428,9 @@ int nghttp2_frame_unpack_headers_payload(nghttp2_headers *frame,
428
428
429
429
frame -> nva = NULL ;
430
430
frame -> nvlen = 0 ;
431
-
432
- return 0 ;
433
431
}
434
432
435
- int nghttp2_frame_pack_priority (nghttp2_bufs * bufs , nghttp2_priority * frame ) {
433
+ void nghttp2_frame_pack_priority (nghttp2_bufs * bufs , nghttp2_priority * frame ) {
436
434
nghttp2_buf * buf ;
437
435
438
436
assert (bufs -> head == bufs -> cur );
@@ -448,17 +446,15 @@ int nghttp2_frame_pack_priority(nghttp2_bufs *bufs, nghttp2_priority *frame) {
448
446
nghttp2_frame_pack_priority_spec (buf -> last , & frame -> pri_spec );
449
447
450
448
buf -> last += NGHTTP2_PRIORITY_SPECLEN ;
451
-
452
- return 0 ;
453
449
}
454
450
455
451
void nghttp2_frame_unpack_priority_payload (nghttp2_priority * frame ,
456
452
const uint8_t * payload ) {
457
453
nghttp2_frame_unpack_priority_spec (& frame -> pri_spec , payload );
458
454
}
459
455
460
- int nghttp2_frame_pack_rst_stream (nghttp2_bufs * bufs ,
461
- nghttp2_rst_stream * frame ) {
456
+ void nghttp2_frame_pack_rst_stream (nghttp2_bufs * bufs ,
457
+ nghttp2_rst_stream * frame ) {
462
458
nghttp2_buf * buf ;
463
459
464
460
assert (bufs -> head == bufs -> cur );
@@ -473,8 +469,6 @@ int nghttp2_frame_pack_rst_stream(nghttp2_bufs *bufs,
473
469
474
470
nghttp2_put_uint32be (buf -> last , frame -> error_code );
475
471
buf -> last += 4 ;
476
-
477
- return 0 ;
478
472
}
479
473
480
474
void nghttp2_frame_unpack_rst_stream_payload (nghttp2_rst_stream * frame ,
@@ -592,16 +586,15 @@ int nghttp2_frame_pack_push_promise(nghttp2_bufs *bufs,
592
586
return frame_pack_headers_shared (bufs , & frame -> hd );
593
587
}
594
588
595
- int nghttp2_frame_unpack_push_promise_payload (nghttp2_push_promise * frame ,
596
- const uint8_t * payload ) {
589
+ void nghttp2_frame_unpack_push_promise_payload (nghttp2_push_promise * frame ,
590
+ const uint8_t * payload ) {
597
591
frame -> promised_stream_id =
598
592
nghttp2_get_uint32 (payload ) & NGHTTP2_STREAM_ID_MASK ;
599
593
frame -> nva = NULL ;
600
594
frame -> nvlen = 0 ;
601
- return 0 ;
602
595
}
603
596
604
- int nghttp2_frame_pack_ping (nghttp2_bufs * bufs , nghttp2_ping * frame ) {
597
+ void nghttp2_frame_pack_ping (nghttp2_bufs * bufs , nghttp2_ping * frame ) {
605
598
nghttp2_buf * buf ;
606
599
607
600
assert (bufs -> head == bufs -> cur );
@@ -616,8 +609,6 @@ int nghttp2_frame_pack_ping(nghttp2_bufs *bufs, nghttp2_ping *frame) {
616
609
617
610
buf -> last =
618
611
nghttp2_cpymem (buf -> last , frame -> opaque_data , sizeof (frame -> opaque_data ));
619
-
620
- return 0 ;
621
612
}
622
613
623
614
void nghttp2_frame_unpack_ping_payload (nghttp2_ping * frame ,
@@ -697,8 +688,8 @@ int nghttp2_frame_unpack_goaway_payload2(nghttp2_goaway *frame,
697
688
return 0 ;
698
689
}
699
690
700
- int nghttp2_frame_pack_window_update (nghttp2_bufs * bufs ,
701
- nghttp2_window_update * frame ) {
691
+ void nghttp2_frame_pack_window_update (nghttp2_bufs * bufs ,
692
+ nghttp2_window_update * frame ) {
702
693
nghttp2_buf * buf ;
703
694
704
695
assert (bufs -> head == bufs -> cur );
@@ -713,8 +704,6 @@ int nghttp2_frame_pack_window_update(nghttp2_bufs *bufs,
713
704
714
705
nghttp2_put_uint32be (buf -> last , (uint32_t )frame -> window_size_increment );
715
706
buf -> last += 4 ;
716
-
717
- return 0 ;
718
707
}
719
708
720
709
void nghttp2_frame_unpack_window_update_payload (nghttp2_window_update * frame ,
@@ -723,7 +712,7 @@ void nghttp2_frame_unpack_window_update_payload(nghttp2_window_update *frame,
723
712
nghttp2_get_uint32 (payload ) & NGHTTP2_WINDOW_SIZE_INCREMENT_MASK ;
724
713
}
725
714
726
- int nghttp2_frame_pack_altsvc (nghttp2_bufs * bufs , nghttp2_extension * frame ) {
715
+ void nghttp2_frame_pack_altsvc (nghttp2_bufs * bufs , nghttp2_extension * frame ) {
727
716
int rv ;
728
717
nghttp2_buf * buf ;
729
718
nghttp2_ext_altsvc * altsvc ;
@@ -752,8 +741,6 @@ int nghttp2_frame_pack_altsvc(nghttp2_bufs *bufs, nghttp2_extension *frame) {
752
741
rv = nghttp2_bufs_add (bufs , altsvc -> field_value , altsvc -> field_value_len );
753
742
754
743
assert (rv == 0 );
755
-
756
- return 0 ;
757
744
}
758
745
759
746
void nghttp2_frame_unpack_altsvc_payload (nghttp2_extension * frame ,
@@ -901,8 +888,8 @@ int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame,
901
888
return 0 ;
902
889
}
903
890
904
- int nghttp2_frame_pack_priority_update (nghttp2_bufs * bufs ,
905
- nghttp2_extension * frame ) {
891
+ void nghttp2_frame_pack_priority_update (nghttp2_bufs * bufs ,
892
+ nghttp2_extension * frame ) {
906
893
int rv ;
907
894
nghttp2_buf * buf ;
908
895
nghttp2_ext_priority_update * priority_update ;
@@ -927,8 +914,6 @@ int nghttp2_frame_pack_priority_update(nghttp2_bufs *bufs,
927
914
priority_update -> field_value_len );
928
915
929
916
assert (rv == 0 );
930
-
931
- return 0 ;
932
917
}
933
918
934
919
void nghttp2_frame_unpack_priority_update_payload (nghttp2_extension * frame ,
@@ -1186,14 +1171,14 @@ static void frame_set_pad(nghttp2_buf *buf, size_t padlen, int framehd_only) {
1186
1171
buf -> last += trail_padlen ;
1187
1172
}
1188
1173
1189
- int nghttp2_frame_add_pad (nghttp2_bufs * bufs , nghttp2_frame_hd * hd ,
1190
- size_t padlen , int framehd_only ) {
1174
+ void nghttp2_frame_add_pad (nghttp2_bufs * bufs , nghttp2_frame_hd * hd ,
1175
+ size_t padlen , int framehd_only ) {
1191
1176
nghttp2_buf * buf ;
1192
1177
1193
1178
if (padlen == 0 ) {
1194
1179
DEBUGF ("send: padlen = 0, nothing to do\n" );
1195
1180
1196
- return 0 ;
1181
+ return ;
1197
1182
}
1198
1183
1199
1184
/*
@@ -1226,6 +1211,4 @@ int nghttp2_frame_add_pad(nghttp2_bufs *bufs, nghttp2_frame_hd *hd,
1226
1211
hd -> flags |= NGHTTP2_FLAG_PADDED ;
1227
1212
1228
1213
DEBUGF ("send: final payloadlen=%zu, padlen=%zu\n" , hd -> length , padlen );
1229
-
1230
- return 0 ;
1231
1214
}
0 commit comments