Skip to content

Commit 2a04a64

Browse files
committed
Remove the redundant code
As myvariable is declared as an integer, it is meaningless that putting u after %d in the format specifier of sscanf for scanning an integer. This patch removes the u in the format specifier for avoiding misleading.
1 parent 2eadbb1 commit 2a04a64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/hello-sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static ssize_t myvariable_store(struct kobject *kobj,
2323
struct kobj_attribute *attr, char *buf,
2424
size_t count)
2525
{
26-
sscanf(buf, "%du", &myvariable);
26+
sscanf(buf, "%d", &myvariable);
2727
return count;
2828
}
2929

0 commit comments

Comments
 (0)