Seems like a very small cleanup.
struct ofpbuf request;
struct flow flow;
size_t n_ofp_actions;
- uint16_t in_port;
int error;
COVERAGE_INC(ofproto_packet_out);
/* Get payload. */
if (opo->buffer_id != htonl(UINT32_MAX)) {
error = ofconn_pktbuf_retrieve(ofconn, ntohl(opo->buffer_id),
- &buffer, &in_port);
+ &buffer, NULL);
if (error || !buffer) {
return error;
}
* identifies a "null" packet buffer (created with pktbuf_get_null()), stores
* NULL in '*bufferp' and UINT16_max in '*in_port'.
*
+ * 'in_port' may be NULL if the input port is not of interest.
+ *
* A returned packet will have at least sizeof(struct ofp_packet_in) bytes of
* headroom.
*
struct ofpbuf *buffer = p->buffer;
if (buffer) {
*bufferp = buffer;
- *in_port = p->in_port;
+ if (in_port) {
+ *in_port = p->in_port;
+ }
p->buffer = NULL;
COVERAGE_INC(pktbuf_retrieved);
return 0;
}
error:
*bufferp = NULL;
- *in_port = UINT16_MAX;
+ if (in_port) {
+ *in_port = UINT16_MAX;
+ }
return error;
}