mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 11:48:56 +03:00
Use unsuspicous var name to not confuse syntax highlighter.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
parent
5f9913570a
commit
bf6a0ea68e
1 changed files with 12 additions and 12 deletions
|
@ -38,7 +38,7 @@
|
||||||
* dirname - parse directory component.
|
* dirname - parse directory component.
|
||||||
*/
|
*/
|
||||||
char *c_dirname (const char *path) {
|
char *c_dirname (const char *path) {
|
||||||
char *new = NULL;
|
char *newbuf = NULL;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
if (path == NULL || *path == '\0') {
|
if (path == NULL || *path == '\0') {
|
||||||
|
@ -67,19 +67,19 @@ char *c_dirname (const char *path) {
|
||||||
/* Remove slashes again */
|
/* Remove slashes again */
|
||||||
while(len > 0 && path[len - 1] == '/') --len;
|
while(len > 0 && path[len - 1] == '/') --len;
|
||||||
|
|
||||||
new = c_malloc(len + 1);
|
newbuf = c_malloc(len + 1);
|
||||||
if (new == NULL) {
|
if (newbuf == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(new, path, len);
|
strncpy(newbuf, path, len);
|
||||||
new[len] = '\0';
|
newbuf[len] = '\0';
|
||||||
|
|
||||||
return new;
|
return newbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *c_basename (const char *path) {
|
char *c_basename (const char *path) {
|
||||||
char *new = NULL;
|
char *newbuf = NULL;
|
||||||
const char *s;
|
const char *s;
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
|
@ -107,15 +107,15 @@ char *c_basename (const char *path) {
|
||||||
return c_strdup(path);
|
return c_strdup(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
new = c_malloc(len + 1);
|
newbuf = c_malloc(len + 1);
|
||||||
if (new == NULL) {
|
if (newbuf == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(new, s, len);
|
strncpy(newbuf, s, len);
|
||||||
new[len] = '\0';
|
newbuf[len] = '\0';
|
||||||
|
|
||||||
return new;
|
return newbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
int c_tmpname(char *template) {
|
int c_tmpname(char *template) {
|
||||||
|
|
Loading…
Reference in a new issue