changeset 36632:43575335eab4

stream_netstream: merge declaration and initialization.
author reimar
date Sat, 25 Jan 2014 16:54:58 +0000
parents 715567f3387f
children f8f6da5f5c57
files stream/stream_netstream.c
diffstat 1 files changed, 4 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_netstream.c	Sat Jan 25 16:54:56 2014 +0000
+++ b/stream/stream_netstream.c	Sat Jan 25 16:54:58 2014 +0000
@@ -169,9 +169,7 @@
 
 static int fill_buffer(stream_t *s, char* buffer, int max_len){
   uint16_t len = le2me_16(max_len);
-  mp_net_stream_packet_t* pack;
-
-  pack = send_net_stream_cmd(s,NET_STREAM_FILL_BUFFER,(char*)&len,2);
+  mp_net_stream_packet_t *pack = send_net_stream_cmd(s,NET_STREAM_FILL_BUFFER,(char*)&len,2);
   if(!pack) {
     return -1;
   }
@@ -190,9 +188,7 @@
 
 static int seek(stream_t *s, int64_t newpos) {
   uint64_t pos = le2me_64(newpos);
-  mp_net_stream_packet_t* pack;
-
-  pack = send_net_stream_cmd(s,NET_STREAM_SEEK,(char*)&pos,8);
+  mp_net_stream_packet_t *pack = send_net_stream_cmd(s,NET_STREAM_SEEK,(char*)&pos,8);
   if(!pack) {
     return 0;
   }
@@ -202,9 +198,7 @@
 }
 
 static int net_stream_reset(struct stream *s) {
-  mp_net_stream_packet_t* pack;
-
-  pack = send_net_stream_cmd(s,NET_STREAM_RESET,NULL,0);
+  mp_net_stream_packet_t *pack = send_net_stream_cmd(s,NET_STREAM_RESET,NULL,0);
   if(!pack) {
     return 0;
   }
@@ -221,9 +215,7 @@
 }
 
 static void close_s(struct stream *s) {
-  mp_net_stream_packet_t* pack;
-
-  pack = send_net_stream_cmd(s,NET_STREAM_CLOSE,NULL,0);
+  mp_net_stream_packet_t *pack = send_net_stream_cmd(s,NET_STREAM_CLOSE,NULL,0);
   free(pack);
 }