瀏覽代碼

[ethernet] Avoid false positive Coverity warning

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 5 年之前
父節點
當前提交
f1e6efa40b
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/net/ethernet.c

+ 1
- 1
src/net/ethernet.c 查看文件

@@ -134,7 +134,7 @@ int eth_pull ( struct net_device *netdev __unused, struct io_buffer *iobuf,
134 134
 	 * frames, without requiring a full LLC protocol layer.
135 135
 	 */
136 136
 	if ( eth_is_llc_packet ( ethhdr ) ) {
137
-		llc_proto = ( &ethhdr->h_protocol + 1 );
137
+		llc_proto = iobuf->data;
138 138
 		*net_proto = *llc_proto;
139 139
 	}
140 140
 

Loading…
取消
儲存