]> git.hungrycats.org Git - linux/commitdiff
Avoid type warning in comparison by making it explicit.
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 22 May 2004 07:27:16 +0000 (00:27 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 22 May 2004 07:27:16 +0000 (00:27 -0700)
(The difference between two pointers is a "size_t", while
MAX_LEN and the result here are "int"s).

drivers/ide/ide-proc.c

index eff7a8ba3922bbef5dfd4faeb122efe02d46506b..e60c5715585fc70adcaba53c8266546d6c27d596 100644 (file)
@@ -508,7 +508,7 @@ int proc_ide_write_settings
                        }
                        if (*p != ':')
                                goto parse_error;
-                       len = min(p - start, MAX_LEN);
+                       len = min_t(int, p - start, MAX_LEN);
                        strncpy(name, start, min(len, MAX_LEN));
                        name[len] = 0;