diff options
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 6 | ||||
-rw-r--r-- | lib-src/ebrowse.c | 4 | ||||
-rw-r--r-- | lib-src/pop.c | 14 |
3 files changed, 14 insertions, 10 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index f79fc20f108..a1479dc2698 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2010-07-07 Andreas Schwab <schwab@linux-m68k.org> + + * ebrowse.c (add_sym, make_namespace): Replace bcopy, bzero by + memcpy, memmove, memset. + * pop.c (pop_retrieve, socket_connection, pop_getline): Likewise. + 2010-07-06 Andreas Schwab <schwab@linux-m68k.org> * movemail.c: Add MAIL_USE_POP around prototypes. diff --git a/lib-src/ebrowse.c b/lib-src/ebrowse.c index 6f846637abd..42bcdfd06f3 100644 --- a/lib-src/ebrowse.c +++ b/lib-src/ebrowse.c @@ -647,7 +647,7 @@ add_sym (char *name, struct sym *nested_in_class) } sym = (struct sym *) xmalloc (sizeof *sym + strlen (name)); - bzero (sym, sizeof *sym); + memset (sym, 0, sizeof *sym); strcpy (sym->name, name); sym->namesp = scope; sym->next = class_table[h]; @@ -1042,7 +1042,7 @@ struct sym * make_namespace (char *name, struct sym *context) { struct sym *s = (struct sym *) xmalloc (sizeof *s + strlen (name)); - bzero (s, sizeof *s); + memset (s, 0, sizeof *s); strcpy (s->name, name); s->next = all_namespaces; s->namesp = context; diff --git a/lib-src/pop.c b/lib-src/pop.c index bbfdd3fc71f..9eaefa4cb83 100644 --- a/lib-src/pop.c +++ b/lib-src/pop.c @@ -612,7 +612,7 @@ pop_retrieve (popserver server, int message, int markfrom, char **msg_buf) } ptr[cp++] = '>'; } - bcopy (fromserver, &ptr[cp], ret); + memcpy (&ptr[cp], fromserver, ret); cp += ret; ptr[cp++] = '\n'; } @@ -1020,7 +1020,7 @@ socket_connection (char *host, int flags) } #endif - bzero ((char *) &addr, sizeof (addr)); + memset (&addr, 0, sizeof (addr)); addr.sin_family = AF_INET; /** "kpop" service is never used: look for 20060515 to see why **/ @@ -1096,8 +1096,7 @@ socket_connection (char *host, int flags) if (it->ai_addrlen == sizeof (addr)) { struct sockaddr_in *in_a = (struct sockaddr_in *) it->ai_addr; - bcopy (&in_a->sin_addr, (char *) &addr.sin_addr, - sizeof (addr.sin_addr)); + memcpy (&addr.sin_addr, &in_a->sin_addr, sizeof (addr.sin_addr)); if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) break; } @@ -1125,8 +1124,7 @@ socket_connection (char *host, int flags) while (*hostent->h_addr_list) { - bcopy (*hostent->h_addr_list, (char *) &addr.sin_addr, - hostent->h_length); + memcpy (&addr.sin_addr, *hostent->h_addr_list, hostent->h_length); if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr))) break; hostent->h_addr_list++; @@ -1318,8 +1316,8 @@ pop_getline (popserver server, char **line) } else { - bcopy (server->buffer + server->buffer_index, - server->buffer, server->data); + memmove (server->buffer, server->buffer + server->buffer_index, + server->data); /* Record the fact that we've searched the data already in the buffer for a CRLF, so that when we search below, we don't have to search the same data twice. There's a "- |