Changes between Version 23 and Version 24 of Hacking
- Timestamp:
- 06/12/15 18:26:37 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Hacking
v23 v24 193 193 }}} 194 194 195 Use explicit comparison in equality operators: 196 197 '''This is right:''' 198 {{{ 199 void *p1, *p2; 200 int i1, i2; 201 char c1, c2; 202 203 if (p1 != NULL) 204 if (p2 == NULL) 205 206 if (i1 != 0) 207 if (i2 == 0) 208 209 if (c1 != '\0') 210 if (c2 == '\0') 211 }}} 212 213 '''This is wrong:''' 214 {{{ 215 void *p1, *p2; 216 int i1, i2; 217 char c1, c2; 218 219 if (p1) 220 if (!p2) 221 222 if (i1) 223 if (!i2) 224 225 if (c1) 226 if (!c2) 227 }}} 228 195 229 === Variables === 196 230