external/ppp
リビジョン | fc562d204c7e5acd6c839f19fa2b3a126df9b351 (tree) |
---|---|
日時 | 2012-11-16 15:21:09 |
作者 | Ben Cheng <bccheng@andr...> |
コミッター | Gerrit Code Review |
Merge "Get rid of strlcat / strlcpy"
@@ -506,8 +506,10 @@ void print_string __P((char *, int, void (*) (void *, char *, ...), | ||
506 | 506 | void *)); /* Format a string for output */ |
507 | 507 | int slprintf __P((char *, int, char *, ...)); /* sprintf++ */ |
508 | 508 | int vslprintf __P((char *, int, char *, va_list)); /* vsprintf++ */ |
509 | +#if !defined(ANDROID_CHANGES) | |
509 | 510 | size_t strlcpy __P((char *, const char *, size_t)); /* safe strcpy */ |
510 | 511 | size_t strlcat __P((char *, const char *, size_t)); /* safe strncpy */ |
512 | +#endif | |
511 | 513 | void dbglog __P((char *, ...)); /* log a debug message */ |
512 | 514 | void info __P((char *, ...)); /* log an informational message */ |
513 | 515 | void notice __P((char *, ...)); /* log a notice-level message */ |
@@ -81,6 +81,8 @@ struct buffer_info { | ||
81 | 81 | int len; |
82 | 82 | }; |
83 | 83 | |
84 | +#if !defined(ANDROID_CHANGES) | |
85 | + | |
84 | 86 | /* |
85 | 87 | * strlcpy - like strcpy/strncpy, doesn't overflow destination buffer, |
86 | 88 | * always leaves destination null-terminated (for len > 0). |
@@ -118,6 +120,7 @@ strlcat(dest, src, len) | ||
118 | 120 | |
119 | 121 | return dlen + strlcpy(dest + dlen, src, (len > dlen? len - dlen: 0)); |
120 | 122 | } |
123 | +#endif | |
121 | 124 | |
122 | 125 | |
123 | 126 | /* |