mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-09 20:40:13 -04:00
28 lines
882 B
Plaintext
28 lines
882 B
Plaintext
$NetBSD: patch-aa,v 1.1.1.1 2007/01/29 16:40:58 minskim Exp $
|
|
|
|
Some platforms (GNU) lack strl* functions.
|
|
Anyways, here the return value is not checked, so toe only
|
|
difference is the trailing \0-padding, which has just very
|
|
minor performance implications.
|
|
|
|
--- build_ht.c.orig 2007-01-26 18:23:32.000000000 +0100
|
|
+++ build_ht.c
|
|
@@ -101,7 +101,7 @@ char **build_ht(char **strings, int nr_o
|
|
prevline[0] = '\0';
|
|
|
|
while (cur_string_no < nr_of_strings) {
|
|
- strlcpy(line, strings[cur_string_no], sizeof line);
|
|
+ strncpy(line, strings[cur_string_no], sizeof line);
|
|
|
|
if (isdigit(line[0]) && strcmp(line, prevline) != 0) {
|
|
/* Get the hashcode from the line: */
|
|
@@ -148,7 +148,7 @@ char **build_ht(char **strings, int nr_o
|
|
cp += strlen(line+i);
|
|
}
|
|
|
|
- strlcpy(prevline, line, sizeof(prevline));
|
|
+ strncpy(prevline, line, sizeof(prevline));
|
|
cur_string_no ++;
|
|
}
|
|
|