projects
/
platform
/
upstream
/
ltrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f8af20
)
Replace a chain of stpcpy's with a sprintf
author
Petr Machata
<pmachata@redhat.com>
Wed, 6 Nov 2013 10:59:59 +0000
(11:59 +0100)
committer
Chanho Park
<chanho61.park@samsung.com>
Fri, 22 Aug 2014 11:38:23 +0000
(20:38 +0900)
- That's clearer and doesn't require _POSIX_SOURCE defines (that are
missing anyway)
prototype.c
patch
|
blob
|
history
diff --git
a/prototype.c
b/prototype.c
index
a892666
..
fa52ff3
100644
(file)
--- a/
prototype.c
+++ b/
prototype.c
@@
-342,9
+342,8
@@
consider_config_dir(struct protolib_cache *cache,
const char *path, const char *key)
{
size_t len = sizeof ".conf";
- char slash[2] = {'/'};
char *buf = alloca(strlen(path) + 1 + strlen(key) + len);
- s
trcpy(stpcpy(stpcpy(stpcpy(buf, path), slash), key), ".conf"
);
+ s
printf(buf, "%s/%s.conf", path, key
);
return protolib_cache_file(cache, buf, 0);
}