]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mount: (deprecated) remove duplicate xstrndup()
authorKarel Zak <kzak@redhat.com>
Thu, 25 Apr 2013 09:05:33 +0000 (11:05 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 25 Apr 2013 09:05:33 +0000 (11:05 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
mount-deprecated/sundries.c
mount-deprecated/sundries.h

index 8ef3618e55b778f2ac2248561d900a36174c775e..37104396726ce7d0e3d279d738b5064538f5cc0c 100644 (file)
@@ -22,20 +22,6 @@ int verbose;
 int nocanonicalize;
 char *progname;
 
-char *
-xstrndup (const char *s, int n) {
-     char *t;
-
-     if (s == NULL)
-         die (EX_SOFTWARE, _("bug in xstrndup call"));
-
-     t = xmalloc(n+1);
-     strncpy(t,s,n);
-     t[n] = 0;
-
-     return t;
-}
-
 /* reallocates its first arg - typical use: s = xstrconcat3(s,t,u); */
 char *
 xstrconcat3 (char *s, const char *t, const char *u) {
index e58fa49756cd2102aa227e3abf2d22f90a73c9dc..428d4a2092def93391c9cf3d2bea83e354c580ab 100644 (file)
@@ -34,7 +34,6 @@ void die(int err, const char *fmt, ...)
 
 int matching_type (const char *type, const char *types);
 int matching_opts (const char *options, const char *test_opts);
-char *xstrndup (const char *s, int n);
 char *xstrconcat3 (char *, const char *, const char *);
 char *xstrconcat4 (char *, const char *, const char *, const char *);