LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2004, 11:43 PM   #1
sibtay
Member
 
Registered: Aug 2004
Location: U.S
Distribution: Ubuntu
Posts: 145

Rep: Reputation: 15
sockets question


I am using

struct sockaddr_in Target;
bzero((unsigned char*) & Target,sizeof(Target));

What is its alternative if i use memset

Can any one tell me what was the reason why bzero was deprecated?
 
Old 08-23-2004, 12:33 AM   #2
DanTheKiwi
LQ Newbie
 
Registered: Aug 2004
Location: Sydney, Australia
Distribution: FreeBSD, Fedora Core 2
Posts: 20

Rep: Reputation: 0
memset((&Target, 0, sizeof(Target));

???????

Dont know about second question, maybe read the source? maybe it had a problem there.
 
Old 08-23-2004, 12:51 AM   #3
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 59
memset() conforms to ISO standards where as bzero() does not. I'm sure the reason it was deprecated was because a standard function to accomplish the same thing already existed (memset()).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
client/server question (with sockets) bicycle Programming 1 11-24-2005 01:26 PM
Sockets and Packet Stream Question Chryzmo Programming 2 11-12-2005 08:54 PM
Regarding sockets arunachalam Linux - Networking 1 10-13-2005 12:04 PM
C sockets question borgy_t Programming 6 03-12-2005 10:28 PM
Question about Sockets Programming sibtay Programming 2 09-24-2004 05:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration