lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.01.1202151815270.15357@frira.zrqbmnf.qr>
Date:	Wed, 15 Feb 2012 18:16:12 +0100 (CET)
From:	Jan Engelhardt <jengelh@...ozas.de>
To:	Richard Weinberger <richard@....at>
cc:	Eric Dumazet <eric.dumazet@...il.com>,
	netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, rostedt@...dmis.org,
	pablo@...filter.org, basti@...l.de
Subject: Re: [PATCH 2/2] Netfilter: xt_LOG: Add timestamp support


On Wednesday 2012-02-15 15:07, Richard Weinberger wrote:
>>> +		struct timespec tv;
>>> +		unsigned int msec;
>>> +
>>> +		getnstimeofday(&tv);
>>> +		msec = tv.tv_nsec / NSEC_PER_MSEC;
>>> +		sb_add(m, "TIMESTAMP=%li.%03li ", tv.tv_sec, msec);
>>
>> Since you want to use this temp variable "unsigned int msec" (I have no
>> idea why...), you must change printf format accordingly : %03u instead
>> of %03li
>
> *grml*.
> I'll remove the temp variable and use %03u.

Why not just print the nsecs directly (with %09 of course)?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ