]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nss: Promote debug message to proper error when time() fails
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 4 Jul 2025 11:49:12 +0000 (13:49 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 18 Jul 2025 13:05:40 +0000 (15:05 +0200)
commitc5015c435b79f07397f6770d225457e6c1a04cb2
tree4e7a8076f6df8a28efca0e64bf7a870d25c57f0f
parent3ab00ebb0a703b1c27372119b9d7373e108a27f5
nss: Promote debug message to proper error when time() fails

The difference between DEBUG() and ERROR() macros is that the
latter also prints (stringified) errno. Inside of findLease()
there's one line where time() is called which is documented as:

  On error, ((time_t) -1) is returned, and errno is set to
  indicate the error.

Therefore, don't just print DEBUG() but ERROR() so that the cause
for the error is printed too.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/nss/libvirt_nss.c