Fix implicit declaration of strndup
authorpixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Wed, 28 Oct 2009 09:10:59 +0000 (09:10 +0000)
committerpixdamix <pixdamix@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Wed, 28 Oct 2009 09:10:59 +0000 (09:10 +0000)
s/strndup/xstrndup/

Thanks to Graham Gower <graham.gower@gmail.com>

git-svn-id: http://opkg.googlecode.com/svn/trunk@224 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libbb/unarchive.c

index a2ae0cb..782efd0 100644 (file)
@@ -621,7 +621,7 @@ file_header_t *get_header_tar(FILE *tar_stream)
 
                 if (tar.formated.prefix[0]) {
                         char *temp = tar_entry->name;
-                        char *prefixTemp = strndup(tar.formated.prefix, 155);
+                        char *prefixTemp = xstrndup(tar.formated.prefix, 155);
                         tar_entry->name = concat_path_file(prefixTemp, temp);
                         free(temp);
                         free(prefixTemp);