projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Optimize a bit by using mempcpy.
[kopensolaris-gnu/glibc.git]
/
nss
/
nsswitch.c
diff --git
a/nss/nsswitch.c
b/nss/nsswitch.c
index
18129bb
..
36c1d00
100644
(file)
--- a/
nss/nsswitch.c
+++ b/
nss/nsswitch.c
@@
-587,8
+587,7
@@
nss_parse_service_list (const char *line)
free (new_service);
return result;
}
free (new_service);
return result;
}
- memcpy (source, name, line - name);
- source[line - name] = '\0';
+ *((char *) __mempcpy (source, name, line - name)) = '\0';
new_service->name = source;
}
new_service->name = source;
}