lkml.org 
[lkml]   [2008]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] DMI: add dmi_match

> +static inline bool dmi_match(enum dmi_field f, const char *str)
> +{
> + const char *info = dmi_get_system_info(f);
> +
> + if (info == NULL || str == NULL)
> + return info == str;
> +
> + return !strcmp(info, str);

Not sure it is worth inlining but its definitely better this way

ACK


\
 
 \ /
  Last update: 2008-12-09 22:03    [W:0.114 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site