aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-10-29 16:23:17 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-10-29 16:24:09 -0400
commitede1a99836507830bfd1285c7e99198252b5c586 (patch)
treef55d2c53a13c2feec04ee5868dd7bec478bfeaa8
parent7b2ea4fd1a371f7d92f113387a00932516e10675 (diff)
downloadsober-ede1a99836507830bfd1285c7e99198252b5c586.tar.gz
sober-ede1a99836507830bfd1285c7e99198252b5c586.tar.bz2
sober-ede1a99836507830bfd1285c7e99198252b5c586.zip
Minor changes
Added a few lines to suppress warnings, Added a dependency on time.h
-rw-r--r--src/bugcomment.c6
-rw-r--r--src/newbug.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bugcomment.c b/src/bugcomment.c
index 6ae16b3..5d676e3 100644
--- a/src/bugcomment.c
+++ b/src/bugcomment.c
@@ -36,7 +36,7 @@ int main(){
if(captchafile == NULL){
printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
printf("Captcha incorrect");
- return;
+ return 0;
}
unsigned long inputhash = hash(captchadecoded);
free(captchadecoded);
@@ -45,7 +45,7 @@ int main(){
if(filehash != inputhash){
printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
printf("Captcha incorrect");
- return;
+ return 0;
}
fclose(captchafile);
//If the program got here, the captcha was correct
@@ -65,7 +65,7 @@ int main(){
if(bugfile == NULL){
printf("%s%c%c\n","Content-Type:text/html;charset=iso-8859-1",13,10);
printf("<p>Unable to find bug!");
- return;
+ return 0;
}
char* dname = replaceHTML(name);
char* duid = useridhash(userid);
diff --git a/src/newbug.c b/src/newbug.c
index b35cb7d..bf28c92 100644
--- a/src/newbug.c
+++ b/src/newbug.c
@@ -4,6 +4,7 @@
#include <stdint.h>
#include "shared.h"
#include "config.h"
+#include <time.h>
int main(){
char* data = getenv("QUERY_STRING");