Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        ecore_str.c 


Log Message:
use CHECK_PARAM_POINTER_RETURN

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_str.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ecore_str.c 25 Jan 2007 23:43:46 -0000      1.2
+++ ecore_str.c 27 Jan 2007 03:51:05 -0000      1.3
@@ -20,6 +20,8 @@
 #include <sys/types.h>
 #include <string.h>
 
+# include "ecore_private.h"
+
 /*
  * Copy src to string dst of size siz.  At most siz-1 characters
  * will be copied.  Always NUL terminates (unless siz == 0).
@@ -64,8 +66,8 @@
    int str_len;
    int prefix_len;
 
-   if (!str || !prefix)
-     return 0;
+   CHECK_PARAM_POINTER_RETURN("str", str, 0);
+   CHECK_PARAM_POINTER_RETURN("prefix", prefix, 0);
 
    str_len = strlen(str);
    prefix_len = strlen(prefix);
@@ -81,8 +83,8 @@
    int str_len;
    int suffix_len;
 
-   if (!str || !suffix)
-     return 0;
+   CHECK_PARAM_POINTER_RETURN("str", str, 0);
+   CHECK_PARAM_POINTER_RETURN("suffix", suffix, 0);
 
    str_len = strlen(str);
    suffix_len = strlen(suffix);



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to