aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqorg11 <qorg@vxempire.xyz>2020-11-15 17:52:02 +0100
committerqorg11 <qorg@vxempire.xyz>2020-11-15 17:52:02 +0100
commitcc03664bf18647d0217864bf21e556625814fe88 (patch)
tree37a69b70adb1117280f381397e906907b120b89e
parentc322cdd470f92b503fea066ce3f837af455c73d8 (diff)
downloadk9core-cc03664bf18647d0217864bf21e556625814fe88.tar.gz
k9core-cc03664bf18647d0217864bf21e556625814fe88.zip
Cleanup code
-rw-r--r--src/date.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/date.c b/src/date.c
index 6c53a18..ebad7b6 100644
--- a/src/date.c
+++ b/src/date.c
@@ -3,6 +3,7 @@
#include <unistd.h>
#include <time.h>
#include <string.h>
+
int
main(int argc,char *argv[])
{
@@ -25,14 +26,12 @@ main(int argc,char *argv[])
timeinfo = localtime(&now);
if(u)
- {
- timeinfo = gmtime(&now);
- }
-
+ timeinfo = gmtime(&now);
+
if(argc > optind && argv[optind][0] == '+')
{
- argv[optind] = strtok(argv[optind],"+");
- strcpy(FORMAT,argv[optind]);
+ argv[optind] = strtok(argv[optind],"+");
+ strcpy(FORMAT,argv[optind]);
}
strftime(buffer,256,FORMAT,timeinfo);