20 Apr
2017
20 Apr
'17
4:27 p.m.
On 20 April 2017 at 17:49, Aaryaman Vasishta <jem456.vasishta(a)gmail.com> wrote:
//DOUBT: Would sizeof(list->pid) be better or sizeof(int)? //Since in the former case, since list->pid is actually a pointer to DWORD, so //sizeof(list->pid) would return 8 bytes and not 4 bytes.
}
Probably sizeof(DWORD) would be fine as well. In general, try following what the surrounding, previously committed code is doing.
sizeof(list->pid) is indeed wrong, since that's the size of the "pid" pointer. sizeof(DWORD) would work, but ideally this would use "sizeof(*list->pid)". Agreed that diffs are the preferred format for review.