]> granicus.if.org Git - shadow/commitdiff
* lib/tcbfuncs.c: Avoid integer to char conversions.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 18 Mar 2010 00:04:05 +0000 (00:04 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 18 Mar 2010 00:04:05 +0000 (00:04 +0000)
ChangeLog
lib/tcbfuncs.c

index 3c6faa604859879a76da1898af01d43b24e4403a..994f7153edafda26dd3938b96d2ba3f9ced1d338 100644 (file)
--- 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  <nicolas.francois@centraliens.net>
 
index b6518513a541c6333d8a96c8b82827d1bc1ea101..0b04bd5ae345e4b249015baaef39214458e0f581 100644 (file)
@@ -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;