From: nekral-guest Date: Thu, 18 Mar 2010 00:04:05 +0000 (+0000) Subject: * lib/tcbfuncs.c: Avoid integer to char conversions. X-Git-Tag: 4.1.5~327 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee15c8717f1a929b5ba9abf6126e1ca2a25aae0b;p=shadow * lib/tcbfuncs.c: Avoid integer to char conversions. --- diff --git a/ChangeLog b/ChangeLog index 3c6faa60..994f7153 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ spw_setdbname's prototype. * lib/tcbfuncs.c: Ignore fflush() return value. * lib/tcbfuncs.c: Avoid implicit signed to unsigned conversions. + * lib/tcbfuncs.c: Avoid integer to char conversions. 2010-03-17 Nicolas François diff --git a/lib/tcbfuncs.c b/lib/tcbfuncs.c index b6518513..0b04bd5a 100644 --- a/lib/tcbfuncs.c +++ b/lib/tcbfuncs.c @@ -192,7 +192,7 @@ static shadowtcb_status mkdir_leading(const char *name, uid_t uid) goto out_free_path; } while ((ind = strchr(ptr, '/'))) { - *ind = 0; + *ind = '\0'; if (asprintf(&dir, TCB_DIR "/%s", path) == -1) { OUT_OF_MEMORY; return SHADOWTCB_FAILURE; @@ -250,7 +250,7 @@ static shadowtcb_status rmdir_leading(char *path) char *ind, *dir; shadowtcb_status ret = SHADOWTCB_SUCCESS; while ((ind = strrchr(path, '/'))) { - *ind = 0; + *ind = '\0'; if (asprintf(&dir, TCB_DIR "/%s", path) == -1) { OUT_OF_MEMORY; return SHADOWTCB_FAILURE;