File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 212212
213213 }
214214
215- int fsclient_devlist (void ) { int result = 0 ;
215+ int fsclient_devlist (void ) {
216216 int loop0 , devcount ; char devlist [256 ], * temp = devlist ;
217217
218218 // Get the device listing.
219219 devcount = ps2netfs_command_devlist ("" , 0 , devlist );
220- if (devcount < 0 ) { printf ("Error: Get device listing failed. (%d)\n" , result ); return -1 ; }
220+ if (devcount < 0 ) { printf ("Error: Get device listing failed. (%d)\n" , devcount ); return -1 ; }
221221
222222 // Output the display header.
223223 printf ("\n [Active Devices]\n\n" );
Original file line number Diff line number Diff line change 326326
327327 int ps2link_request_read (void * packet ) {
328328 struct { unsigned int number ; unsigned short length ; int fd ; int size ; } PACKED * request = packet ;
329- int result = -1 , size = -1 ; char buffer [65536 ], * bigbuffer ;
329+ int result = -1 , size = -1 ; char buffer [65536 ];
330330
331331 // If a big read is requested...
332332 if (ntohl (request -> size ) > sizeof (buffer )) {
333333
334334 // Allocate the bigbuffer.
335- bigbuffer = malloc (ntohl (request -> size ));
335+ char * bigbuffer = malloc (ntohl (request -> size ));
336336
337337 // Perform the request.
338338 result = size = read (ntohl (request -> fd ), bigbuffer , ntohl (request -> size ));
367367
368368 int ps2link_request_write (void * packet ) {
369369 struct { unsigned int number ; unsigned short length ; int fd ; int size ; } PACKED * request = packet ;
370- int result = -1 ; char buffer [65536 ], * bigbuffer ;
370+ int result = -1 ; char buffer [65536 ];
371371
372372 // If a big write is requested...
373373 if (ntohl (request -> size ) > sizeof (buffer )) {
374374
375375 // Allocate the bigbuffer.
376- bigbuffer = malloc (ntohl (request -> size ));
376+ char * bigbuffer = malloc (ntohl (request -> size ));
377377
378378 // Read the request data.
379379 network_receive_all (request_socket , bigbuffer , ntohl (request -> size ));
You can’t perform that action at this time.
0 commit comments