Remove NULL checks for AFS_NONNULL parameters
[openafs.git] / src / opr / casestrcpy.c
index 7f80ded..8cfe37d 100644 (file)
 
 /* Just like strncpy but shift-case in transit and forces null termination */
 char *
-lcstring(char *d, char *s, int n)
+lcstring(char *d, const char *s, int n)
 {
     char *original_d = d;
     char c;
 
-    if ((s == 0) || (d == 0))
-       return 0;               /* just to be safe */
     while (n) {
        c = *s++;
        if (isupper(c))
@@ -39,13 +37,11 @@ lcstring(char *d, char *s, int n)
 }
 
 char *
-ucstring(char *d, char *s, int n)
+ucstring(char *d, const char *s, int n)
 {
     char *original_d = d;
     char c;
 
-    if ((s == 0) || (d == 0))
-       return 0;
     while (n) {
        c = *s++;
        if (islower(c))
@@ -86,7 +82,7 @@ stoupper(char *s)
  *   buf: storage for the composed string. Any data in it will be lost.
  *   len: length of the buffer.
  *   ...: variable number of string arguments. The last argument must be
- *        NULL.
+ *        (char *)NULL.
  * Returns buf or NULL if the buffer was not sufficiently large.
  */
 char *
@@ -97,7 +93,7 @@ strcompose(char *buf, size_t len, ...)
     char *str;
     size_t slen;
 
-    if (buf == NULL || len <= 0)
+    if (len <= 0)
        return NULL;
 
     *buf = '\0';