Changes between Version 10 and Version 11 of Hacking
- Timestamp:
- 02/15/11 21:27:38 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Hacking
v10 v11 160 160 }}} 161 161 162 Use your best judgement and choose the more readable option. 163 164 '''This is right:''' 165 {{{ 166 bytes = read (fd, &routine.pointer, sizeof (routine)); 167 if (bytes == -1 || (size_t) bytes < (sizeof (routine))) 168 }}} 169 170 '''This is wrong:''' 171 {{{ 172 if (bytes = read (fd, &routine.pointer, sizeof (routine)) == -1 || (size_t) bytes < (sizeof (routine))) 173 174 if (read (from_parent_fd, &i, sizeof (int)) != sizeof (int)) 175 return NULL; 176 177 }}} 178 162 179 typical structure of *.c file 163 180