projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow disks to come from build/ directory as well as current
[pintos-anon]
/
src
/
lib
/
string.c
diff --git
a/src/lib/string.c
b/src/lib/string.c
index 8971fae21b3c4d6da492b2e54614dbb3e6f8e058..01e4ecb378d462e4fb639ea01db177cb8070f977 100644
(file)
--- a/
src/lib/string.c
+++ b/
src/lib/string.c
@@
-1,8
+1,4
@@
#include <string.h>
#include <string.h>
-
-#ifdef KERNEL
-#define NDEBUG
-#endif
#include <debug.h>
/* Copies SIZE bytes from SRC to DST, which must not overlap.
#include <debug.h>
/* Copies SIZE bytes from SRC to DST, which must not overlap.
@@
-339,7
+335,7
@@
strlcpy (char *dst, const char *src, size_t size)
{
size_t dst_len = size - 1;
if (src_len < dst_len)
{
size_t dst_len = size - 1;
if (src_len < dst_len)
-
src_len = dst
_len;
+
dst_len = src
_len;
memcpy (dst, src, dst_len);
dst[dst_len] = '\0';
}
memcpy (dst, src, dst_len);
dst[dst_len] = '\0';
}