-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbolum14_4.tex
49 lines (49 loc) · 1.01 KB
/
bolum14_4.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
\documentclass[22pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[turkish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\begin{document}
\textbf{14.4 NULL referanstan ayırmayı aramak}\\
\\
Bu SmPL eşleştirmesi NULL referanstan ayırmayı arar.Önce bir ifade NULL ile karşılaştırılır,değişken işaretçi yeniden atanmazsa bu ifadeye referans ayırmak yasaklanmıştır.
\\
Orijinal\\
\begin{lstlisting}
1 foo = kmalloc(1024);
2 if (!foo) {
3 printk ("Error %s", foo->here);
4 return;
5 }
6 foo->ok = 1;
7 return;
\end{lstlisting}
Anlamsal Eşleşme\\
\begin{lstlisting}
1 @@
2 expression E, E1;
3 identifier f;
4 statement S1,S2,S3;
5 @@
6
7 * if (E == NULL)
8 {
9 ... when != if (E == NULL) S1 else S2
10 when != E = E1
11 * E->f
12 ... when any
13 return ...;
14 }
15 else S3
\end{lstlisting}
Eşleşmiş Satırlar\\
\begin{lstlisting}
1 foo = kmalloc(1024);
2 if (!foo) {
3 printk ("Error %s", foo->here);
4 return;
5 }
6 foo->ok = 1;
7 return;
\end{lstlisting}
\end{document}