OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f28e68
)
Use stpcpy() (posix 2008) for slight code shrink.
author
Rob Landley
<rob@landley.net>
Thu, 9 Feb 2012 01:29:39 +0000
(19:29 -0600)
committer
Rob Landley
<rob@landley.net>
Thu, 9 Feb 2012 01:29:39 +0000
(19:29 -0600)
lib/getmountlist.c
patch
|
blob
|
history
diff --git
a/lib/getmountlist.c
b/lib/getmountlist.c
index
8410a92
..
1b23544
100644
(file)
--- a/
lib/getmountlist.c
+++ b/
lib/getmountlist.c
@@
-33,10
+33,8
@@
struct mtab_list *getmountlist(int die)
stat(me.mnt_dir, &(mt->stat));
statvfs(me.mnt_dir, &(mt->statvfs));
// Remember information from /proc/mounts
- strcpy(mt->type, me.mnt_type);
- mt->dir = mt->type + strlen(mt->type) + 1;
- strcpy(mt->dir, me.mnt_dir);
- mt->device = mt->dir + strlen(mt->dir) + 1;
+ mt->dir = stpcpy(mt->type, me.mnt_type) + 1;
+ mt->device = stpcpy(mt->dir, me.mnt_dir) + 1;
strcpy(mt->device, me.mnt_fsname);
mtlist = mt;
}