gethostbyaddr segmentation error FAQ
来源:互联网 发布:淘宝快递不取 编辑:程序博客网 时间:2024/05/21 22:40
p, li { white-space: pre-wrap; }
struct hostent* hostEnt;
hostEnt=gethostbyaddr(inet_ntoa(ptr->ip_src),sizeof(ptr->ip_src),AF_INET);
if(!hostEnt)
{
tmp=new QStandardItem("No Name");
Row.append(tmp);
}else
{
tmp=new QStandardItem(hostEnt->h_name);
Row.append(tmp);
}
above is right,but before I get to know this issue, I didn't check the hostEnt's value,so when there is no result to return , hostEnt-> operation will throw out segmentation error
note that....
- gethostbyaddr segmentation error FAQ
- gethostbyaddr()
- gethostbyaddr()
- gethostbyaddr ,gethostbyname
- gethostbyname(), gethostbyaddr()
- Segmentation fault error及core dumped
- Linux mmap() ENOMEM error causing Segmentation Fault
- Segmentation
- Segmentation
- Segmentation
- FAQ:Project : error PRJ0003 : Error spawning 'cmd.exe'.
- Linux 编程段错误(segmentation error)总结
- Linux 编程段错误(segmentation error)总结
- PETSC ERROR: Segmentation Violation, probably memory access out of range
- Linux 编程段错误(segmentation error)总结
- Segmentation fault(bus error or access violation)的原因
- Linux mmap() ENOMEM error causing Segmentation Fault,使用mongodb注意
- clang: error: unable to execute command: Segmentation fault: 11
- 开发基于JBoss5的EJB3 (1)
- spring定时器
- 云计算
- jsp生成验证码
- 想成为嵌入式程序员应知道的0x10个基本问题
- gethostbyaddr segmentation error FAQ
- uC/OS-II在51单片机上的移植
- 嵌入式C开发人员的最好的0x10道笔试题
- 指针和引用的区别
- JAVA字符串处理函数列表一览
- 运行期显示多态指针的类型名
- 2009职称英语
- ZAJD型电动调节蝶阀
- interbase 大小写导致的问题一例