comparison cli-agentfwd.c @ 1459:06d52bcb8094

Pointer parameter could be declared as pointing to const
author Francois Perrad <francois.perrad@gadz.org>
date Sat, 19 Aug 2017 17:16:13 +0200
parents 83d85b28b353
children 79eef94ccea9
comparison
equal deleted inserted replaced
1458:bdd3802c8ac6 1459:06d52bcb8094
106 4 bytes Length, msb first. Does not include length itself. 106 4 bytes Length, msb first. Does not include length itself.
107 1 byte Packet type. The value 255 is reserved for future extensions. 107 1 byte Packet type. The value 255 is reserved for future extensions.
108 data Any data, depending on packet type. Encoding as in the ssh packet 108 data Any data, depending on packet type. Encoding as in the ssh packet
109 protocol. 109 protocol.
110 */ 110 */
111 static buffer * agent_request(unsigned char type, buffer *data) { 111 static buffer * agent_request(unsigned char type, const buffer *data) {
112 112
113 buffer * payload = NULL; 113 buffer * payload = NULL;
114 buffer * inbuf = NULL; 114 buffer * inbuf = NULL;
115 size_t readlen = 0; 115 size_t readlen = 0;
116 ssize_t ret; 116 ssize_t ret;
228 buf_free(inbuf); 228 buf_free(inbuf);
229 inbuf = NULL; 229 inbuf = NULL;
230 } 230 }
231 } 231 }
232 232
233 void cli_setup_agent(struct Channel *channel) { 233 void cli_setup_agent(const struct Channel *channel) {
234 if (!getenv("SSH_AUTH_SOCK")) { 234 if (!getenv("SSH_AUTH_SOCK")) {
235 return; 235 return;
236 } 236 }
237 237
238 start_send_channel_request(channel, "[email protected]"); 238 start_send_channel_request(channel, "[email protected]");
252 252
253 agent_get_key_list(ret_list); 253 agent_get_key_list(ret_list);
254 } 254 }
255 255
256 void agent_buf_sign(buffer *sigblob, sign_key *key, 256 void agent_buf_sign(buffer *sigblob, sign_key *key,
257 buffer *data_buf) { 257 const buffer *data_buf) {
258 buffer *request_data = NULL; 258 buffer *request_data = NULL;
259 buffer *response = NULL; 259 buffer *response = NULL;
260 unsigned int siglen; 260 unsigned int siglen;
261 int packet_type; 261 int packet_type;
262 262