Print statistics at power off.
[pintos-anon] / src / lib / string.c
index bec4444670b025768485cb143edb0329de3cb60c..8971fae21b3c4d6da492b2e54614dbb3e6f8e058 100644 (file)
@@ -1,4 +1,8 @@
 #include <string.h>
+
+#ifdef KERNEL
+#define NDEBUG
+#endif
 #include <debug.h>
 
 /* Copies SIZE bytes from SRC to DST, which must not overlap.
@@ -212,7 +216,9 @@ strstr (const char *haystack, const char *needle)
    single string.
 
    strtok_r() modifies the string S, changing delimiters to null
-   bytes.  Thus, S must be a modifiable string.
+   bytes.  Thus, S must be a modifiable string.  String literals,
+   in particular, are *not* modifiable in C, even though for
+   backward compatibility they are not `const'.
 
    Example usage: