2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 12:58:00 +00:00

12 Commits

Author SHA1 Message Date
Harold Lim
428b2eddc9 Rename NOT_REACHED to OVS_NOT_REACHED
This allows other libraries to use util.h that has already
defined NOT_REACHED.

Signed-off-by: Harold Lim <haroldl@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-12-17 13:16:39 -08:00
Alin Serdean
34582733d9 Avoid printf type modifiers not supported by MSVC C runtime library.
The MSVC C library printf() implementation does not support the 'z', 't',
'j', or 'hh' format specifiers.  This commit changes the Open vSwitch code
to avoid those format specifiers, switching to standard macros from
<inttypes.h> where available and inventing new macros resembling them
where necessary.  It also updates CodingStyle to specify the macros' use
and adds a Makefile rule to report violations.

Signed-off-by: Alin Serdean <aserdean@cloudbasesolutions.com>
Co-authored-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-11-25 23:38:59 -08:00
Alex Wang
bdd2719efb CodingStyle: Add guide about using thread safety types and annotations.
This commit adds guide about using thread safety types and annotations
to CodingStyle file.

Signed-off-by: Alex Wang <alexw@nicira.com>
[blp@nicira.com edited the advice slightly]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-08-09 13:48:11 -07:00
Ben Pfaff
8a6de510b0 INSTALL, CodingStyle: Recognize that Clang is an acceptable compiler.
Clang has nice static analysis and works well as an Open vSwitch compiler,
so mention it more explicitly.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-08-01 15:32:44 -07:00
Ben Pfaff
0d0673857b CodingStyle: Mention our common return value conventions.
CC: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-03-04 08:14:07 -08:00
Ben Pfaff
568e23fc27 CodingStyle: Fix indentation.
This got changed away from what I actually prefer in commit be2c418b73fc
(Cleanup isdigit() warnings.).

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-16 16:08:15 -08:00
Ben Pfaff
c214278b0d CodingStyle: Clarify C dialect section and add rationale.
Requested-by: Ethan Jackson <ethan@nicira.com>
2010-11-10 10:55:10 -08:00
Ben Pfaff
b93e69830a CodingStyle: Mention that "free" functions should accept a null pointer.
I've always written OVS code this way, so this just codifies it so that
others know.
2010-11-03 17:15:39 -07:00
Ben Pfaff
ede818437a CodingStyle: Drop advice about breaking lines before binary operators.
I like the style that was prescribed here--I find it slightly easier to
read--but everyone else who submits code seems to prefer breaking
lines after binary operators instead.  No point in fighting the tide.
2010-04-20 11:01:44 -07:00
Justin Pettit
be2c418b73 Cleanup isdigit() warnings.
NetBSD's gcc complains if isdigit()'s argument is an unadorned char.  This
provides an appropriate cast.
2009-08-25 14:11:44 -07:00
Ben Pfaff
3d222126b4 netdev: Change netdev_get_mtu() to return an error code.
To make the netdev code more portable, it needs to support returning error
codes from functions that don't have them.  This commit changes
netdev_get_mtu() to return an error code and updates its caller.

(Currently netdev_get_mtu() won't ever return an error, but other future
implementations might.)
2009-07-30 16:07:13 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00