Skip to content

Commit

Permalink
[WATCHDOG] sizeof cleanup
Browse files Browse the repository at this point in the history
Use sizeof(*) instead of sizeof * (See Codingstyle documentation).

Signed-off-by: Wim Van Sebroeck <[email protected]>
  • Loading branch information
Wim Van Sebroeck committed Sep 18, 2009
1 parent d1833c2 commit e04ab95
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/watchdog/iop_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static long iop_wdt_ioctl(struct file *file,

switch (cmd) {
case WDIOC_GETSUPPORT:
if (copy_to_user(argp, &ident, sizeof ident))
if (copy_to_user(argp, &ident, sizeof(ident)))
ret = -EFAULT;
else
ret = 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/rm9k_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static const struct resource *wdt_gpi_get_resource(struct platform_device *pdv,
const char *name, unsigned int type)
{
char buf[80];
if (snprintf(buf, sizeof buf, "%s_0", name) >= sizeof buf)
if (snprintf(buf, sizeof(buf), "%s_0", name) >= sizeof(buf))
return NULL;
return platform_get_resource_byname(pdv, type, buf);
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/watchdog/sc1200wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static long sc1200wdt_ioctl(struct file *file, unsigned int cmd,

switch (cmd) {
case WDIOC_GETSUPPORT:
if (copy_to_user(argp, &ident, sizeof ident))
if (copy_to_user(argp, &ident, sizeof(ident)))
return -EFAULT;
return 0;

Expand Down

0 comments on commit e04ab95

Please sign in to comment.