diff --git a/e2fsprogs/old_e2fsprogs/blkid/devname.c b/e2fsprogs/old_e2fsprogs/blkid/devname.c
index 5b9e48f..348e5d4 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/devname.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/devname.c
@@ -273,7 +273,7 @@
 		return -BLKID_ERR_PARAM;
 
 	if (cache->bic_flags & BLKID_BIC_FL_PROBED &&
-	    time(0) - cache->bic_time < BLKID_PROBE_INTERVAL)
+	    time(NULL) - cache->bic_time < BLKID_PROBE_INTERVAL)
 		return 0;
 
 	blkid_read_cache(cache);
@@ -335,7 +335,7 @@
 
 	fclose(proc);
 
-	cache->bic_time = time(0);
+	cache->bic_time = time(NULL);
 	cache->bic_flags |= BLKID_BIC_FL_PROBED;
 	blkid_flush_cache(cache);
 	return 0;
diff --git a/e2fsprogs/old_e2fsprogs/blkid/probe.c b/e2fsprogs/old_e2fsprogs/blkid/probe.c
index 48b240e..1f7188e 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/probe.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/probe.c
@@ -562,7 +562,7 @@
 	if (!dev)
 		return NULL;
 
-	now = time(0);
+	now = time(NULL);
 	diff = now - dev->bid_time;
 
 	if ((now < dev->bid_time) ||
@@ -659,7 +659,7 @@
 found_type:
 	if (dev && type) {
 		dev->bid_devno = st.st_rdev;
-		dev->bid_time = time(0);
+		dev->bid_time = time(NULL);
 		dev->bid_flags |= BLKID_BID_FL_VERIFIED;
 		cache->bic_flags |= BLKID_BIC_FL_CHANGED;
 
diff --git a/e2fsprogs/old_e2fsprogs/e2fsck.c b/e2fsprogs/old_e2fsprogs/e2fsck.c
index b927a9f..6ade0db 100644
--- a/e2fsprogs/old_e2fsprogs/e2fsck.c
+++ b/e2fsprogs/old_e2fsprogs/e2fsck.c
@@ -2270,7 +2270,7 @@
 	ext2fs_mark_super_dirty(fs);
 	fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
 	inode.i_links_count = 0;
-	inode.i_dtime = time(0);
+	inode.i_dtime = time(NULL);
 	if ((retval = ext2fs_write_inode(fs, ino, &inode)) != 0)
 		goto err_out;
 
@@ -3381,7 +3381,7 @@
 			 */
 			if (!LINUX_S_ISDIR(inode->i_mode)) {
 				if (fix_problem(ctx, PR_1_ROOT_NO_DIR, &pctx)) {
-					inode->i_dtime = time(0);
+					inode->i_dtime = time(NULL);
 					inode->i_links_count = 0;
 					ext2fs_icount_store(ctx->inode_link_info,
 							    ino, 0);
@@ -3475,7 +3475,7 @@
 		    inode->i_dtime < ctx->fs->super->s_inodes_count) {
 			if (fix_problem(ctx, PR_1_LOW_DTIME, &pctx)) {
 				inode->i_dtime = inode->i_links_count ?
-					0 : time(0);
+					0 : time(NULL);
 				e2fsck_write_inode(ctx, ino, inode,
 						   "pass1");
 			}
@@ -3489,7 +3489,7 @@
 			if (!inode->i_dtime && inode->i_mode) {
 				if (fix_problem(ctx,
 					    PR_1_ZERO_DTIME, &pctx)) {
-					inode->i_dtime = time(0);
+					inode->i_dtime = time(NULL);
 					e2fsck_write_inode(ctx, ino, inode,
 							   "pass1");
 				}
@@ -3659,7 +3659,7 @@
 		}
 		e2fsck_read_inode(ctx, EXT2_RESIZE_INO, inode,
 				  "recreate inode");
-		inode->i_mtime = time(0);
+		inode->i_mtime = time(NULL);
 		e2fsck_write_inode(ctx, EXT2_RESIZE_INO, inode,
 				  "recreate inode");
 		fs->block_map = save_bmap;
@@ -4169,7 +4169,7 @@
 	if (pb.clear) {
 		inode->i_links_count = 0;
 		ext2fs_icount_store(ctx->inode_link_info, ino, 0);
-		inode->i_dtime = time(0);
+		inode->i_dtime = time(NULL);
 		dirty_inode++;
 		ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, ino);
 		ext2fs_unmark_inode_bitmap(ctx->inode_reg_map, ino);
@@ -4202,7 +4202,7 @@
 		if (fix_problem(ctx, PR_1_ZERO_LENGTH_DIR, pctx)) {
 			inode->i_links_count = 0;
 			ext2fs_icount_store(ctx->inode_link_info, ino, 0);
-			inode->i_dtime = time(0);
+			inode->i_dtime = time(NULL);
 			dirty_inode++;
 			ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, ino);
 			ext2fs_unmark_inode_bitmap(ctx->inode_reg_map, ino);
@@ -5147,7 +5147,7 @@
 	/* Inode may have changed by block_iterate, so reread it */
 	e2fsck_read_inode(ctx, ino, &inode, "delete_file");
 	inode.i_links_count = 0;
-	inode.i_dtime = time(0);
+	inode.i_dtime = time(NULL);
 	if (inode.i_file_acl &&
 	    (fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR)) {
 		count = 1;
@@ -6393,7 +6393,7 @@
 	ext2fs_icount_store(ctx->inode_link_info, ino, 0);
 	e2fsck_read_inode(ctx, ino, &inode, "deallocate_inode");
 	inode.i_links_count = 0;
-	inode.i_dtime = time(0);
+	inode.i_dtime = time(NULL);
 	e2fsck_write_inode(ctx, ino, &inode, "deallocate_inode");
 	clear_problem_context(&pctx);
 	pctx.ino = ino;
@@ -6890,7 +6890,7 @@
 	memset(&inode, 0, sizeof(inode));
 	inode.i_mode = 040755;
 	inode.i_size = fs->blocksize;
-	inode.i_atime = inode.i_ctime = inode.i_mtime = time(0);
+	inode.i_atime = inode.i_ctime = inode.i_mtime = time(NULL);
 	inode.i_links_count = 2;
 	inode.i_blocks = fs->blocksize / 512;
 	inode.i_block[0] = blk;
@@ -7138,7 +7138,7 @@
 	memset(&inode, 0, sizeof(inode));
 	inode.i_mode = 040700;
 	inode.i_size = fs->blocksize;
-	inode.i_atime = inode.i_ctime = inode.i_mtime = time(0);
+	inode.i_atime = inode.i_ctime = inode.i_mtime = time(NULL);
 	inode.i_links_count = 2;
 	inode.i_blocks = fs->blocksize / 512;
 	inode.i_block[0] = blk;
@@ -7492,7 +7492,7 @@
 		if (fix_problem(ctx, PR_4_ZERO_LEN_INODE, &pctx)) {
 			ext2fs_icount_store(ctx->inode_link_info, i, 0);
 			inode.i_links_count = 0;
-			inode.i_dtime = time(0);
+			inode.i_dtime = time(NULL);
 			e2fsck_write_inode(ctx, i, &inode,
 					   "disconnect_inode");
 			/*
@@ -11558,7 +11558,7 @@
 		if (!inode.i_links_count) {
 			ext2fs_inode_alloc_stats2(fs, ino, -1,
 						  LINUX_S_ISDIR(inode.i_mode));
-			inode.i_dtime = time(0);
+			inode.i_dtime = time(NULL);
 		} else {
 			inode.i_dtime = 0;
 		}
@@ -12714,7 +12714,7 @@
 	unsigned int reason_arg = 0;
 	long next_check;
 	int batt = is_on_batt();
-	time_t now = time(0);
+	time_t now = time(NULL);
 
 	if ((ctx->options & E2F_OPT_FORCE) || cflag || swapfs)
 		return;
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/bb_inode.c b/e2fsprogs/old_e2fsprogs/ext2fs/bb_inode.c
index 855f86e..1deae54 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/bb_inode.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/bb_inode.c
@@ -125,9 +125,9 @@
 	if (retval)
 		goto cleanup;
 
-	inode.i_atime = inode.i_mtime = time(0);
+	inode.i_atime = inode.i_mtime = time(NULL);
 	if (!inode.i_ctime)
-		inode.i_ctime = time(0);
+		inode.i_ctime = time(NULL);
 	inode.i_blocks = rec.bad_block_count * (fs->blocksize / 512);
 	inode.i_size = rec.bad_block_count * fs->blocksize;
 
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/mkjournal.c b/e2fsprogs/old_e2fsprogs/ext2fs/mkjournal.c
index 5bdd346..af47aee 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/mkjournal.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/mkjournal.c
@@ -231,7 +231,7 @@
 
 	inode.i_size += fs->blocksize * size;
 	inode.i_blocks += (fs->blocksize / 512) * es.newblocks;
-	inode.i_mtime = inode.i_ctime = time(0);
+	inode.i_mtime = inode.i_ctime = time(NULL);
 	inode.i_links_count = 1;
 	inode.i_mode = LINUX_S_IFREG | 0600;
 
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/res_gdt.c b/e2fsprogs/old_e2fsprogs/ext2fs/res_gdt.c
index 31cc89e..3c550d5 100644
--- a/e2fsprogs/old_e2fsprogs/ext2fs/res_gdt.c
+++ b/e2fsprogs/old_e2fsprogs/ext2fs/res_gdt.c
@@ -117,7 +117,7 @@
 			sb->s_feature_ro_compat |=
 				EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
 		}
-		inode.i_ctime = time(0);
+		inode.i_ctime = time(NULL);
 	}
 
 	for (rsv_off = 0, gdt_off = fs->desc_blocks,
@@ -209,7 +209,7 @@
 	       inode.i_size);
 #endif
 	if (inode_dirty) {
-		inode.i_atime = inode.i_mtime = time(0);
+		inode.i_atime = inode.i_mtime = time(NULL);
 		retval2 = ext2fs_write_inode(fs, EXT2_RESIZE_INO, &inode);
 		if (!retval)
 			retval = retval2;
