Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-ppp: Commit

external/ppp


Commit MetaInfo

Revisión8527dca81baa73fba64d6724bd498195ed1abbf2 (tree)
Tiempo2012-11-16 09:12:12
AutorNick Kralevich <nnk@goog...>
CommiterNick Kralevich

Log Message

Get rid of strlcat / strlcpy

Android already has a version of strlcat / strlcpy. There's
no need for pppd to duplicate it.

Change-Id: Ie094cccc2d2b8553cf3c6629c6a79bf3b8db9d06

Cambiar Resumen

Diferencia

--- a/pppd/pppd.h
+++ b/pppd/pppd.h
@@ -506,8 +506,10 @@ void print_string __P((char *, int, void (*) (void *, char *, ...),
506506 void *)); /* Format a string for output */
507507 int slprintf __P((char *, int, char *, ...)); /* sprintf++ */
508508 int vslprintf __P((char *, int, char *, va_list)); /* vsprintf++ */
509+#if !defined(ANDROID_CHANGES)
509510 size_t strlcpy __P((char *, const char *, size_t)); /* safe strcpy */
510511 size_t strlcat __P((char *, const char *, size_t)); /* safe strncpy */
512+#endif
511513 void dbglog __P((char *, ...)); /* log a debug message */
512514 void info __P((char *, ...)); /* log an informational message */
513515 void notice __P((char *, ...)); /* log a notice-level message */
--- a/pppd/utils.c
+++ b/pppd/utils.c
@@ -81,6 +81,8 @@ struct buffer_info {
8181 int len;
8282 };
8383
84+#if !defined(ANDROID_CHANGES)
85+
8486 /*
8587 * strlcpy - like strcpy/strncpy, doesn't overflow destination buffer,
8688 * always leaves destination null-terminated (for len > 0).
@@ -118,6 +120,7 @@ strlcat(dest, src, len)
118120
119121 return dlen + strlcpy(dest + dlen, src, (len > dlen? len - dlen: 0));
120122 }
123+#endif
121124
122125
123126 /*
Show on old repository browser