From 931de892cc1c07ba3ce728cce3e4a64fe59c8444 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 21 Jun 2007 12:43:45 +0000 Subject: random shrinkage of statics, -60 bytes saved --- modutils/insmod.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'modutils/insmod.c') diff --git a/modutils/insmod.c b/modutils/insmod.c index b9d8a02..cba8dc4 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -3656,16 +3656,18 @@ static int obj_gpl_license(struct obj_file *f, const char **license) static void set_tainted(struct obj_file *f, int fd, char *m_name, int kernel_has_tainted, int taint, const char *text1, const char *text2) { + static smallint printed_info; + char buf[80]; int oldval; - static int first = 1; + if (fd < 0 && !kernel_has_tainted) return; /* New modutils on old kernel */ printf("Warning: loading %s will taint the kernel: %s%s\n", m_name, text1, text2); - if (first) { + if (!printed_info) { printf(" See %s for information about tainted modules\n", TAINT_URL); - first = 0; + printed_info = 1; } if (fd >= 0) { read(fd, buf, sizeof(buf)-1); -- cgit v1.1