]> git.tuebingen.mpg.de Git - dss.git/blobdiff - str.c
Assorted typo fixes in comments.
[dss.git] / str.c
diff --git a/str.c b/str.c
index e2b7f303ae4d717850a561bc9d4338495b0f6d3f..ff8f02a4846af402c71b8a2818f2db7fceedfde8 100644 (file)
--- a/str.c
+++ b/str.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2010 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2004-2010 Andre Noll <maan@tuebingen.mpg.de>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -72,8 +72,8 @@ __must_check __malloc void *dss_realloc(void *p, size_t size)
         */
        assert(size);
        if (!(p = realloc(p, size))) {
-               DSS_EMERG_LOG("realloc failed (size = %zu), aborting\n",
-                       size);
+               DSS_EMERG_LOG(("realloc failed (size = %zu), aborting\n",
+                       size));
                exit(EXIT_FAILURE);
        }
        return p;
@@ -98,8 +98,8 @@ __must_check __malloc void *dss_malloc(size_t size)
        p = malloc(size);
 
        if (!p) {
-               DSS_EMERG_LOG("malloc failed (size = %zu),  aborting\n",
-                       size);
+               DSS_EMERG_LOG(("malloc failed (size = %zu),  aborting\n",
+                       size));
                exit(EXIT_FAILURE);
        }
        return p;
@@ -145,7 +145,7 @@ __must_check __malloc char *dss_strdup(const char *s)
 
        if ((ret = strdup(s? s: "")))
                return ret;
-       DSS_EMERG_LOG("strdup failed, aborting\n");
+       DSS_EMERG_LOG(("strdup failed, aborting\n"));
        exit(EXIT_FAILURE);
 }
 
@@ -173,7 +173,7 @@ __must_check __printf_1_2 __malloc char *make_message(const char *fmt, ...)
 /**
  * Get the home directory of the current user.
  *
- * \return A dynammically allocated string that must be freed by the caller. If
+ * \return A dynamically allocated string that must be freed by the caller. If
  * the home directory could not be found, this function returns "/tmp".
  */
 __must_check __malloc char *get_homedir(void)
@@ -214,7 +214,7 @@ int dss_atoi64(const char *str, int64_t *value)
 /**
  * Get the logname of the current user.
  *
- * \return A dynammically allocated string that must be freed by the caller. On
+ * \return A dynamically allocated string that must be freed by the caller. On
  * errors, the string "unknown user" is returned, i.e. this function never
  * returns \p NULL.
  *
@@ -233,7 +233,7 @@ __must_check __malloc char *dss_logname(void)
  * \param argv_ptr Pointer to the list of substrings.
  * \param delim Delimiter.
  *
- * This function modifies \a args by replacing each occurance of \a delim by
+ * This function modifies \a args by replacing each occurrence of \a delim by
  * zero. A \p NULL-terminated array of pointers to char* is allocated dynamically
  * and these pointers are initialized to point to the broken-up substrings
  * within \a args. A pointer to this array is returned via \a argv_ptr.
@@ -242,7 +242,7 @@ __must_check __malloc char *dss_logname(void)
  */
 unsigned split_args(char *args, char *** const argv_ptr, const char *delim)
 {
-       char *p = args;
+       char *p;
        char **argv;
        size_t n = 0, i, j;