[Ubuntu-BD] C code tuning
shiplu
shiplu.net at gmail.com
Mon Oct 3 21:13:58 UTC 2011
Make sure all return paths return and integer value.
for example following code doesn't return int in all paths.
int main(){
int n=0;
if(n){
return 0;
}
}
But this one does.
int main(){
int n=1;
if(n==2){
return 1;
}else{
return 0;
}
}
hope you got the idea.
--
Shiplu Mokadd.im
Follow me, http://twitter.com/shiplu
Innovation distinguishes between follower and leader
More information about the ubuntu-bd
mailing list