O'Reilly logo
  • Tony Wang thinks this is interesting:

Because negative offsets are possible, we should be careful to compare the return value from lseek as being equal to or not equal to –1, rather than testing whether it is less than 0.


Cover of Advanced Programming in the UNIX® Environment, Third Edition


So what if the offset is -1?