@@ -418,8 +418,8 @@ void nghttp2_frame_unpack_priority_spec(nghttp2_priority_spec *pri_spec,
418418  nghttp2_priority_spec_init (pri_spec , dep_stream_id , weight , exclusive );
419419}
420420
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 ) {
423423  if  (frame -> hd .flags  &  NGHTTP2_FLAG_PRIORITY ) {
424424    nghttp2_frame_unpack_priority_spec (& frame -> pri_spec , payload );
425425  } else  {
@@ -428,11 +428,9 @@ int nghttp2_frame_unpack_headers_payload(nghttp2_headers *frame,
428428
429429  frame -> nva  =  NULL ;
430430  frame -> nvlen  =  0 ;
431- 
432-   return  0 ;
433431}
434432
435- int  nghttp2_frame_pack_priority (nghttp2_bufs  * bufs , nghttp2_priority  * frame ) {
433+ void  nghttp2_frame_pack_priority (nghttp2_bufs  * bufs , nghttp2_priority  * frame ) {
436434  nghttp2_buf  * buf ;
437435
438436  assert (bufs -> head  ==  bufs -> cur );
@@ -448,17 +446,15 @@ int nghttp2_frame_pack_priority(nghttp2_bufs *bufs, nghttp2_priority *frame) {
448446  nghttp2_frame_pack_priority_spec (buf -> last , & frame -> pri_spec );
449447
450448  buf -> last  +=  NGHTTP2_PRIORITY_SPECLEN ;
451- 
452-   return  0 ;
453449}
454450
455451void  nghttp2_frame_unpack_priority_payload (nghttp2_priority  * frame ,
456452                                           const  uint8_t  * payload ) {
457453  nghttp2_frame_unpack_priority_spec (& frame -> pri_spec , payload );
458454}
459455
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 ) {
462458  nghttp2_buf  * buf ;
463459
464460  assert (bufs -> head  ==  bufs -> cur );
@@ -473,8 +469,6 @@ int nghttp2_frame_pack_rst_stream(nghttp2_bufs *bufs,
473469
474470  nghttp2_put_uint32be (buf -> last , frame -> error_code );
475471  buf -> last  +=  4 ;
476- 
477-   return  0 ;
478472}
479473
480474void  nghttp2_frame_unpack_rst_stream_payload (nghttp2_rst_stream  * frame ,
@@ -592,16 +586,15 @@ int nghttp2_frame_pack_push_promise(nghttp2_bufs *bufs,
592586  return  frame_pack_headers_shared (bufs , & frame -> hd );
593587}
594588
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 ) {
597591  frame -> promised_stream_id  = 
598592      nghttp2_get_uint32 (payload ) &  NGHTTP2_STREAM_ID_MASK ;
599593  frame -> nva  =  NULL ;
600594  frame -> nvlen  =  0 ;
601-   return  0 ;
602595}
603596
604- int  nghttp2_frame_pack_ping (nghttp2_bufs  * bufs , nghttp2_ping  * frame ) {
597+ void  nghttp2_frame_pack_ping (nghttp2_bufs  * bufs , nghttp2_ping  * frame ) {
605598  nghttp2_buf  * buf ;
606599
607600  assert (bufs -> head  ==  bufs -> cur );
@@ -616,8 +609,6 @@ int nghttp2_frame_pack_ping(nghttp2_bufs *bufs, nghttp2_ping *frame) {
616609
617610  buf -> last  = 
618611      nghttp2_cpymem (buf -> last , frame -> opaque_data , sizeof (frame -> opaque_data ));
619- 
620-   return  0 ;
621612}
622613
623614void  nghttp2_frame_unpack_ping_payload (nghttp2_ping  * frame ,
@@ -697,8 +688,8 @@ int nghttp2_frame_unpack_goaway_payload2(nghttp2_goaway *frame,
697688  return  0 ;
698689}
699690
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 ) {
702693  nghttp2_buf  * buf ;
703694
704695  assert (bufs -> head  ==  bufs -> cur );
@@ -713,8 +704,6 @@ int nghttp2_frame_pack_window_update(nghttp2_bufs *bufs,
713704
714705  nghttp2_put_uint32be (buf -> last , (uint32_t )frame -> window_size_increment );
715706  buf -> last  +=  4 ;
716- 
717-   return  0 ;
718707}
719708
720709void  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,
723712      nghttp2_get_uint32 (payload ) &  NGHTTP2_WINDOW_SIZE_INCREMENT_MASK ;
724713}
725714
726- int  nghttp2_frame_pack_altsvc (nghttp2_bufs  * bufs , nghttp2_extension  * frame ) {
715+ void  nghttp2_frame_pack_altsvc (nghttp2_bufs  * bufs , nghttp2_extension  * frame ) {
727716  int  rv ;
728717  nghttp2_buf  * buf ;
729718  nghttp2_ext_altsvc  * altsvc ;
@@ -752,8 +741,6 @@ int nghttp2_frame_pack_altsvc(nghttp2_bufs *bufs, nghttp2_extension *frame) {
752741  rv  =  nghttp2_bufs_add (bufs , altsvc -> field_value , altsvc -> field_value_len );
753742
754743  assert (rv  ==  0 );
755- 
756-   return  0 ;
757744}
758745
759746void  nghttp2_frame_unpack_altsvc_payload (nghttp2_extension  * frame ,
@@ -901,8 +888,8 @@ int nghttp2_frame_unpack_origin_payload(nghttp2_extension *frame,
901888  return  0 ;
902889}
903890
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 ) {
906893  int  rv ;
907894  nghttp2_buf  * buf ;
908895  nghttp2_ext_priority_update  * priority_update ;
@@ -927,8 +914,6 @@ int nghttp2_frame_pack_priority_update(nghttp2_bufs *bufs,
927914                        priority_update -> field_value_len );
928915
929916  assert (rv  ==  0 );
930- 
931-   return  0 ;
932917}
933918
934919void  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) {
11861171  buf -> last  +=  trail_padlen ;
11871172}
11881173
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 ) {
11911176  nghttp2_buf  * buf ;
11921177
11931178  if  (padlen  ==  0 ) {
11941179    DEBUGF ("send: padlen = 0, nothing to do\n" );
11951180
1196-     return   0 ;
1181+     return ;
11971182  }
11981183
11991184  /* 
@@ -1226,6 +1211,4 @@ int nghttp2_frame_add_pad(nghttp2_bufs *bufs, nghttp2_frame_hd *hd,
12261211  hd -> flags  |= NGHTTP2_FLAG_PADDED ;
12271212
12281213  DEBUGF ("send: final payloadlen=%zu, padlen=%zu\n" , hd -> length , padlen );
1229- 
1230-   return  0 ;
12311214}
0 commit comments