From: Tom Gundersen Date: Sun, 6 Apr 2014 16:00:26 +0000 (+0200) Subject: udev: net_id - use constants rather than magic numbers X-Git-Tag: v213~467 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=19aa72f74e41045510b4af3f1415b419d42ff20b udev: net_id - use constants rather than magic numbers --- diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index aa08196ad..c80c30ac7 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -94,6 +94,7 @@ #include #include #include +#include #include #include "udev.h" @@ -451,10 +452,10 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool return EXIT_FAILURE; i = strtoul(s, NULL, 0); switch (i) { - case 1: /* ARPHRD_ETHER */ + case ARPHRD_ETHER: prefix = "en"; break; - case 256: /* ARPHRD_SLIP */ + case ARPHRD_SLIP: prefix = "sl"; break; default: