aboutsummaryrefslogtreecommitdiffstats
path: root/ftp/atftp/files/patch-options.c
blob: fd96417175f24721d4cf2e7dd13c97e2c2a17933 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- options.c.orig  2003-04-25 08:16:18.000000000 +0800
+++ options.c   2010-10-11 10:23:20.000000000 +0800
@@ -273,6 +273,12 @@
      return ERR;
 }
 
+int opt_equal(struct tftp_opt *opt1, struct tftp_opt *opt2)
+{
+     return ((strncmp(opt1->option, opt2->option, OPT_SIZE) == 0) &&
+             (strncmp(opt1->value, opt2->value, OPT_SIZE) == 0));
+} 
+
 void opt_set_tsize(int tsize, struct tftp_opt *options)
 {
      snprintf(options[OPT_TSIZE].value, VAL_SIZE, "%d", tsize);