Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 9c47820

Browse files
committed
Step 3
1 parent 6310c8b commit 9c47820

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

courses/cpp/uboot/answers/step-13.ql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @kind problem
3+
*/
4+
5+
import cpp
6+
7+
from Macro m
8+
where m.getName().regexpMatch("ntoh(s|ll?)")
9+
select m, "a macro reading from the network"
10+

courses/cpp/uboot/image/config/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"locationPaths": "https://github.com/u-boot/u-boot/blob/d0d07ba86afc8074d79e436b1ba4478fa0f0c1b5{path}#L{line-start}-L{line-end}",
44
"expectedResults": {
55
"step-11.ql": "step-11.csv",
6-
"step-12.ql": "step-12.csv"
6+
"step-12.ql": "step-12.csv",
7+
"step-13.ql": "step-13.csv"
78
}
89
}

courses/cpp/uboot/image/step-13.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"m","URL for m","col1"
2+
"#define ntohs(x) __bswap_16 (x)","file:///usr/x86_64-linux-gnu/include/netinet/in.h:402:1:402:34","a macro reading from the network"
3+
"#define ntohl(x) __bswap_32 (x)","file:///usr/x86_64-linux-gnu/include/netinet/in.h:401:1:401:34","a macro reading from the network"
4+
"#define ntohs(x) ___ntohs(x)","file:///opt/src/include/linux/byteorder/generic.h:142:1:142:28","a macro reading from the network"
5+
"#define ntohl(x) ___ntohl(x)","file:///opt/src/include/linux/byteorder/generic.h:140:1:140:28","a macro reading from the network"

0 commit comments

Comments
 (0)