mirror of
https://github.com/torvalds/linux.git
synced 2026-04-23 00:55:48 -04:00
[PATCH] drivers/isdn: Handcrafted MIN/MAX Macro removal
Cleanups done to use min/max macros from kernel.h. Handcrafted MIN/MAX macros are changed to use macros in kernel.h [akpm@osdl.org: warning fix] Signed-off-by: Amol Lad <amol@verismonetworks.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
@@ -756,14 +756,14 @@ int diva_get_driver_info (dword id, byte* data, int data_length) {
|
||||
|
||||
data_length -= 9;
|
||||
|
||||
if ((to_copy = MIN(strlen(clients[id].drvName), data_length-1))) {
|
||||
if ((to_copy = min(strlen(clients[id].drvName), (size_t)(data_length-1)))) {
|
||||
memcpy (p, clients[id].drvName, to_copy);
|
||||
p += to_copy;
|
||||
data_length -= to_copy;
|
||||
if ((data_length >= 4) && clients[id].hDbg->drvTag[0]) {
|
||||
*p++ = '(';
|
||||
data_length -= 1;
|
||||
if ((to_copy = MIN(strlen(clients[id].hDbg->drvTag), data_length-2))) {
|
||||
if ((to_copy = min(strlen(clients[id].hDbg->drvTag), (size_t)(data_length-2)))) {
|
||||
memcpy (p, clients[id].hDbg->drvTag, to_copy);
|
||||
p += to_copy;
|
||||
data_length -= to_copy;
|
||||
|
||||
Reference in New Issue
Block a user