summaryrefslogtreecommitdiffstats
path: root/src/pacman/util.c
diff options
context:
space:
mode:
authorAnatol Pomozov <anatol.pomozov@gmail.com>2013-04-15 04:33:46 +0200
committerAllan McRae <allan@archlinux.org>2013-04-18 05:20:13 +0200
commit769facca22db733f0a70ce6a38062d37fe8d2579 (patch)
treef344a3ec31338568237ca4eeff0a4025b52ee0f5 /src/pacman/util.c
parent597286eb258f841dfc00f65474138fc6192f0092 (diff)
downloadpacman-769facca22db733f0a70ce6a38062d37fe8d2579.tar.gz
pacman-769facca22db733f0a70ce6a38062d37fe8d2579.tar.xz
Fix spelling errors using 'codespell' tool
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/util.c')
-rw-r--r--src/pacman/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index 643b6fea..35359678 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -314,7 +314,7 @@ size_t strtrim(char *str)
return end - pch;
}
-/* Replace all occurances of 'needle' with 'replace' in 'str', returning
+/* Replace all occurrences of 'needle' with 'replace' in 'str', returning
* a new string (must be free'd) */
char *strreplace(const char *str, const char *needle, const char *replace)
{
@@ -336,11 +336,11 @@ char *strreplace(const char *str, const char *needle, const char *replace)
q = strstr(p, needle);
}
- /* no occurences of needle found */
+ /* no occurrences of needle found */
if(!list) {
return strdup(str);
}
- /* size of new string = size of old string + "number of occurences of needle"
+ /* size of new string = size of old string + "number of occurrences of needle"
* x "size difference between replace and needle" */
newsz = strlen(str) + 1 +
alpm_list_count(list) * (replacesz - needlesz);
@@ -354,7 +354,7 @@ char *strreplace(const char *str, const char *needle, const char *replace)
for(i = list; i; i = alpm_list_next(i)) {
q = i->data;
if(q > p) {
- /* add chars between this occurence and last occurence, if any */
+ /* add chars between this occurrence and last occurrence, if any */
memcpy(newp, p, (size_t)(q - p));
newp += q - p;
}