core: don't use const integers where const expression is needed

This commit is contained in:
Thomas Haller 2017-12-12 15:49:39 +01:00
parent 08d41ada7a
commit 96ae9309e7
2 changed files with 6 additions and 4 deletions

View file

@ -93,8 +93,10 @@ static void
_init_nm_debug (NMConfig *config)
{
gs_free char *debug = NULL;
const guint D_RLIMIT_CORE = 1;
const guint D_FATAL_WARNINGS = 2;
enum {
D_RLIMIT_CORE = (1 << 0),
D_FATAL_WARNINGS = (1 << 1),
};
GDebugKey keys[] = {
{ "RLIMIT_CORE", D_RLIMIT_CORE },
{ "fatal-warnings", D_FATAL_WARNINGS },

View file

@ -1246,8 +1246,8 @@ typedef struct {
static gboolean
match_device_s390_subchannels_parse (const char *s390_subchannels, guint32 *out_a, guint32 *out_b, guint32 *out_c)
{
const int BUFSIZE = 30;
char buf[BUFSIZE + 1];
char buf[30 + 1];
const int BUFSIZE = G_N_ELEMENTS (buf) - 1;
guint i = 0;
char *pa = NULL, *pb = NULL, *pc = NULL;
gint64 a, b, c;