Update sync/device.c

size_t is not necessarily an int (on OSX it isn't), so reading back sizeof(size_t) as opposed to sizeof(int) won't work. I take it it's a copy/paste bug :)
Merge pull request #2 from bstrr/patch-1

Update sync/device.c