J.F.'s latest printer fixes plus his gcc -picky fix for web/cgi.c
authorJeremy Allison <jra@samba.org>
Wed, 11 Nov 1998 23:31:37 +0000 (23:31 +0000)
committerJeremy Allison <jra@samba.org>
Wed, 11 Nov 1998 23:31:37 +0000 (23:31 +0000)
Jeremy.

source/printing/printing.c
source/web/cgi.c

index 2aecb580473ed5322a200e21e696bad6d4ac5f2f..09a574c2c9afe350dd7b0a85e4b624f92af9c234 100644 (file)
@@ -323,8 +323,10 @@ static BOOL parse_lpq_lprng(char *line,print_queue_struct *buf,BOOL first)
   char *tokarr[LPRNG_MAXTOK];
   char *cptr;
   int  num_tok = 0;
+  pstring line2;
 
-  tokarr[0] = strtok(line," \t");
+  pstrcpy(line2,line);
+  tokarr[0] = strtok(line2," \t");
   num_tok++;
   while (((tokarr[num_tok] = strtok(NULL," \t")) != NULL)
          && (num_tok < LPRNG_MAXTOK)) {
index 86366d1083f980824f593b1b638db291cd3cad09..41d099bac90c4645d6601e74e1d1378f655a82c0 100644 (file)
@@ -411,7 +411,7 @@ void cgi_setup(char *rootdir, int auth_required)
                char *x;
 
                /* Save the users name if available */
-               if (x = getenv("REMOTE_USER")) {
+               if ((x = getenv("REMOTE_USER"))!=NULL) {
                        C_user = strdup(x);
                } else {
                        C_user = "";