Re: funny gettimeofday

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Always check return codes. gettimeofday() *can* fail (most likely,
> tv1 and/or tv2 are bum pointers that don't point where you think).

As a matter of fact, no, it can not, at least as long as its second argument
is NULL:

# RETURN VALUE
# 
#     The gettimeofday() function shall return 0 and no value shall be
#     reserved to indicate an error.

(Single Unix version 3)

If the provided buffer is invalid, the error will be reported through a
signal (SIGSEGV or maybe SIGBUS if it is an alignment problem).

Attachment: signature.asc
Description: Digital signature

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux